如何在所有浏览器支持的asp.net Web应用程序中显示视频 [英] How do i display a video in an asp.net web application that is supported on all browsers
问题描述
您好b $ b
我目前正在尝试在页面加载时显示我的视频。
我一直在通过创建一个对象作为下面的代码,能够使这个在Internet Explorer上工作
但是我确实需要在所有主流浏览器上播放这个视频,例如Chrome / Firefox
我在下面的代码中添加了以下代码,我将一个播放器嵌入到asp.net页面中,但是我收到一个错误,没有插件可用于显示此内容
我不能使用HTML 5而且我要求视频在所有浏览器上播放,用户无需下载媒体播放器
问候
我尝试过:
< object id =mediaplayertype =video / x-ms-wmvclassid =CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6width =500height =500>
< param name =urlvalue =file:/// C:/Wildlife.wmvvaluetype =reftype =video / x- ms-wmv/>
< param name =animationatStartvalue =1/>
< param name =transparentatStartvalue = 1/>
< param name =autoStartvalue =1/>
< param name =ShowControlsvalue =1 />
< param name =ShowDisplayvalue =1/>
< param name =ShowStatusBarvalue =1/> ;
< param name =playcountvalue =99999/>
< param name =clickToPlayvalue =1/>
< param name =autoRewindvalue =1/>
< param name =displaysizevalue =0/>
< param name =stretchtofitvalue =1/>
< param name =enableContextMenuvalue =0/>
< param name =uiMod evalue =none/>< / object>
这是我用来嵌入视频播放器的代码
< embed type =video / x-ms-wmvwidth =416pxheight =320pxautostart =TrueURL =file:/// C:/ Wildlife。 wmvenabled =Truebalance =0currentPosition =0enableContextMenu =TruefullScreen =Falsemute =FalseplayCount =1rate =1stretchTofit =FalseuiMode = 3>< / embed>
Hi
I am currently trying to get my video to display when the page loads.
I have been able to get this to work on Internet explorer by creating an object as the code below
I do however require this video to play on all major browsers e.g.Chrome/Firefox
I have added the following code below where i have embeded a player into the asp.net page, but i get an error, "No plugin available to display this content"
I cannot use HTML 5 and i require the video to play on all browsers without the users having to have to download the media player
Regards
What I have tried:
<object id="mediaplayer" type="video/x-ms-wmv" classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" width="500" height="500">
<param name="url" value="file:///C:/Wildlife.wmv" valuetype="ref" type="video/x-ms-wmv" />
<param name="animationatStart" value="1" />
<param name="transparentatStart" value="1" />
<param name="autoStart" value="1" />
<param name="ShowControls" value="1" />
<param name="ShowDisplay" value="1" />
<param name="ShowStatusBar" value="1" />
<param name="playcount" value="99999" />
<param name="clickToPlay" value="1" />
<param name="autoRewind" value="1" />
<param name="displaysize" value="0" />
<param name="stretchtofit" value="1" />
<param name="enableContextMenu" value="0" />
<param name="uiMode" value="none" /></object>
THis is the code i used to embed the video player
<embed type="video/x-ms-wmv" width="416px" height="320px" autostart="True" URL="file:///C:/Wildlife.wmv" enabled="True" balance="0" currentPosition="0" enableContextMenu="True" fullScreen="False" mute="False" playCount="1" rate="1" stretchTofit="False" uiMode="3"></embed>
推荐答案
您将不得不使用基于闪存的查看器,有很多媒体播放插件在那里像jplayer等,所以谷歌他们并选择一个适合。
如果你不想使用Flash或HTML5那么你不能让这个工作在所有机器。如果浏览器可以自然地执行此操作,那么这些插件将不存在。
You'll have to use a flash-based viewer, there are lots of media playing plug-ins out there like jplayer etc, so google them and pick one that fits.
If you don't want to use Flash, or HTML5 then you can't get this working on all machines. Those plug-ins wouldn't exist if browsers could do this naturally.
这篇关于如何在所有浏览器支持的asp.net Web应用程序中显示视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!