如何在firefox中的html页面上显示视频
我确实看过这个问题,但提问者没有得到任何答复。尽管如此,我还是想尝试一下。
我想在 html 页面上嵌入视频文件。该代码在 IE 上运行良好,但在 Firefox 上不起作用。
代码:
<object id="WMPlay" width="640" height="480" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,70" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<param name="URL" value="XYZ.wma" />
<param name="AutoStart" value="false" />
<embed name="WMplay" width="640" height="480" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"
src="XYZ.wma" allowchangedisplaysize="True" showcontrols="1"
autostart="false" showdisplay="1" showstatusbar="1">
</embed>
</object>
请注意,我不允许使用任何第三方工具(如 Flash)显示视频。
有人可以告诉我我错过了什么吗?或者更好的解决方案..独立于浏览器的东西...:)
I did looked at this question, but the asker didn't got any reply. Still, I'm giving it a try.
I want to embed a video file on a html page. The code works fine on IE but doesn't work on firefox.
The code:
<object id="WMPlay" width="640" height="480" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,70" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<param name="URL" value="XYZ.wma" />
<param name="AutoStart" value="false" />
<embed name="WMplay" width="640" height="480" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"
src="XYZ.wma" allowchangedisplaysize="True" showcontrols="1"
autostart="false" showdisplay="1" showstatusbar="1">
</embed>
</object>
Please note that I'm not allowed to display video using any third party tool (like flash).
Can someone please tell what am I missing? Or a better solution..something which is browser independent... :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看起来 Firefox 需要一个插件,检查这个测试页面:
http://plugindoc.mozdev.org/测试页/wmp11.html
Looks like firefox needs a plugin, check this test page:
http://plugindoc.mozdev.org/testpages/wmp11.html
这可能是 .wmv 扩展名的问题,该扩展名是 Microsoft 专有格式。
您应该将视频转换为更“网络友好”的格式,并使用此代码来确保跨浏览器/html 版本兼容性:
http://camendesign.com/code/video_for_everybody
That's probably an issue with .wmv extension, which is a Microsoft proprietary format.
You should convert your video to a more "web-friendly" format, and use this code to ensure cross-browser/html version compatibility:
http://camendesign.com/code/video_for_everybody
Fire Fox 仅显示 .ogg 和 WebM...
www.w3schools.com/tags/tag_video.asp
Fire fox only displays .ogg and WebM...
www.w3schools.com/tags/tag_video.asp