从IIS上已部署的应用程序播放视频 [英] Play video from deployed application on IIS
问题描述
你好,
在IIS上播放视频时出现问题.如果我是从Visual Studio运行我的应用程序,那么在本地主机上播放视频时,它可以正常运行,但是一旦部署它,就只会启动我的player.aspx,但不会播放我的视频.
这是我的代码
Hello,
I have a problem while playing video on IIS. If I am running my application from visual studio it works perfectly alright while I play video on localhost but as soon as I deploy it only my player.aspx gets launched but it doesnt play my video.
This is my code
$("#someVideo").append('<source src="<%=ResolveUrl("~/Uploads/Videos/' + urlParams['practice'] + '/' + filename[0] + '.mp4") %>" type="video/mp4">');
我已经使用Firebug检查了路径,它为我提供了正确的路径,但根本不播放视频.请帮我.我也在谷歌浏览器中尝试过,但它根本不起作用.
I have checked path using firebug it gives me right path but it doesn''t play video at all. Please help me with that. I tried in google chrome as well but it doesnt work at all.
推荐答案
(#someVideo").append('< 源 src =" <% = ResolveUrl(" )%>" 类型 视频/mp4"
("#someVideo").append('<source src="<%=ResolveUrl("~/Uploads/Videos/' + urlParams['practice'] + '/' + filename[0] + '.mp4") %>" type="video/mp4">');
我已经使用Firebug检查了路径,它为我提供了正确的路径,但根本不播放视频.请帮我.我也在google chrome中尝试过,但它根本不起作用.
I have checked path using firebug it gives me right path but it doesn''t play video at all. Please help me with that. I tried in google chrome as well but it doesnt work at all.
您是否检查了托管应用程序的IIS中添加的MIME类型?
http:
//www.hosting.com/support/dedicated/IIS/newmime/ [ ^ ]
http://www.microsoft.com. com/technet/prodtechnol/WindowsServer2003/Library/IIS/cd72c0dc-c5b8-42e4-96c2-b3c656f99ead.mspx?mfr = true [
Hi,
Have you check that MIME type added in the IIS where you host the application?
http:
//www.hosting.com/support/dedicated/IIS/newmime/[^]
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/cd72c0dc-c5b8-42e4-96c2-b3c656f99ead.mspx?mfr=true[^]
See the above link how to add MIME Type.
Thanks,
Viprat
这篇关于从IIS上已部署的应用程序播放视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!