MediaPlayer 不显示控件 - Firefox 和 IE 的问题。 怎么解决呢?
我得到了这段代码:
<object id="MMPlayer1"
codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701
type=application/x-oleobject height=238 width=240 align=absmiddle
classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95>
<param name="FileName" value="http://www.abradio.cz/asx/beta32.asx">
<param name="ShowControls" value="1">
<param name="ShowStatusBar" value="0">
<param name="ShowDisplay" value="0">
<param name="DefaultFrame" value="Slide">
<param name=”PlayCount” value="1">
<param name="Autostart" value="1">
<embed
src="http://www.abradio.cz/asx/beta32.asx" width=240 height=238 autostart=1 loop=0
align="absmiddle" type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/download/default.asp"
showcontrols=1 showdisplay=1 showstatusbar=0 > </embed></object>
它似乎无法正常工作,如“无视频”所示。我宁愿显示自定义图像而不是它,或者控制面板来暂停或停止流。 有人可以帮忙解决这个问题吗?
I got this piece of code:
<object id="MMPlayer1"
codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701
type=application/x-oleobject height=238 width=240 align=absmiddle
classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95>
<param name="FileName" value="http://www.abradio.cz/asx/beta32.asx">
<param name="ShowControls" value="1">
<param name="ShowStatusBar" value="0">
<param name="ShowDisplay" value="0">
<param name="DefaultFrame" value="Slide">
<param name=”PlayCount” value="1">
<param name="Autostart" value="1">
<embed
src="http://www.abradio.cz/asx/beta32.asx" width=240 height=238 autostart=1 loop=0
align="absmiddle" type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/download/default.asp"
showcontrols=1 showdisplay=1 showstatusbar=0 > </embed></object>
It doesn't seem to work properly, as "no video" shows.. I'd rather have custom image to be shown instead of it, or control panel to pause, or stop the stream. Anyone can help with this one please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该使用 Flash 播放器在所有主要浏览器中播放视频。 您可以按照与 Windows Media Player 相同的方式嵌入它。 缺点是您无法使用 Flash 播放 ASX 文件,除非您先将它们转换为 FLV 文件。 查看此网站以获取有关如何嵌入 Flash 播放器的信息。 查看此内容,将 Windows Media 文件转换为 Flash FLV 文件。 它指向 FFMpeg,一个开源视频转换器。 Windows 可执行文件位于此处。
但要使您的视频在所有 IE 浏览器中播放,请执行以下操作:
首先,视频不会显示,因为您使用“文件名”而不是“URL”来指向 URL。 :-)
要播放“beta32.asx”文件,请删除该行:
并将其替换为以下行:
要从播放器中删除播放控件,请将“ShowControls”更改为“0”:
from:
to:
和 使用此处找到的示例来演示如何连接您自己的按钮来控制播放。 它将要求您使用一些 JavaScript。
You should use the Flash player to play video in all major browsers. You can embed it in the same way you did with Windows Media Player. The downside is that you cannot play ASX files with Flash unless you first convert them to FLV files. Check out this website for information on how to embed the Flash player. And check this out for converting your Windows Media files to Flash FLV files. It points to FFMpeg, an open source video converter. The executable files for Windows are here.
But to make your video play in all IE browsers do this:
For one, the video is not showing because you're using "Filename" instead of "URL" to point to a URL. :-)
To play the "beta32.asx" file remove the line:
And replace it with the line:
To remove the playback controls from the player, change "ShowControls" to "0":
from:
to:
And use the examples found here to show how to wire up your own buttons to control the playback. It will require you to use some JavaScript.