最近LZ做一个网站的在线听课功能,代码如下  <object id="lllll" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,5,0803"
                                                type="application/x-oleobject" width="346" height="194" standby="Loading Windows Media Player components..."
                                                classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" vspace="0" hspace="0">
                                                <param name="AutoStart" value="true">
                                                <param name="AutoSize" value="false">
                                                <param name="balance" value="0">
                                                <param name="currentPosition" value="0">
                                                <param name="enableContextMenu" value="false">
                                                <param name="enableErrorDialogs" value="false">
                                                <param name="enabled" value="true">
                                                <param name="fullScreen" value="false">
                                                <param name="invokeURLs" value="false">
                                                <param name="mute" value="false">
                                                <param name="volume" value="80">
                                                <param name="playCount" value="1">
                                                <param name="rate" value="1">
                                                <param name="uiMode" value="none">
                                                <param name="URL" value="video/a123.wmv">
                                            </object>
主要用的就是控制播放器的外观,即<param name="uiMode" value="none">,其它的功能我是有JS控制的。
但是在火狐上不行,LZ查了很多资料,还是没有解决。现在把发现的方法和问题列出:
1.用Embed标签解决。
代码如下:
 <embed id="lllll" 
            src="video/a123.wmv" width="500" height="350"
            type="application/x-oleobject" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
            standby="Loading Windows Media Player components..." loop="1" uiMode="none">
此种方法可以播放 但是 不能改变视频的外观和功能,只能用mediaplayer自带的功能。而且 说 uiMode不是其属性。lz就找了Embe的控制外观的属性 controls 但是仍然提示说controls 不是其属性。lz只是想把mediaplayer自带的功能屏蔽掉(就是视频下面的控制面板,像音量、进度等),只显示视频播放那部分就行了。那位大侠可以指点一下小弟。在线等
2.兼容火狐和IE
代码如下:
 <object id="lllll" type="video/x-ms-wmv" height="172" width="210">
            <param name="AutoStart" value="true">
            <param name="AutoSize" value="false">
            <param name="balance" value="0">
            <param name="currentPosition" value="0">
            <param name="enableContextMenu" value="false">
            <param name="enableErrorDialogs" value="false">
            <param name="enabled" value="true">
            <param name="fullScreen" value="false">
            <param name="invokeURLs" value="false">
            <param name="mute" value="false">
            <param name="volume" value="80">
            <param name="playCount" value="1">
            <param name="rate" value="1">
            <param name="uiMode" value="none">
            <param name="URL" value="http://61.158.143.221:8001/Course/video/a123.wmv">
        </object>
这种方法要安装插件,但是Param控制的属性不起作用。用此方法与上面的Embed标签一样的效果。lz杯具了。
大侠们赶紧帮小弟解决下吧。急急急!!!

解决方案 »

  1. 火狐中用<embed>标签。。好像不认object
      

  2.  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="1001" height="290">
      <param name="movie" value="baner.swf" />
      <param name="quality" value="high" />
      <param name="wmode" value="opaque" />
      <embed src="ndex/baner.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1001" height="290"></embed>
    </object> 
    可以用swfobject 插入flash http://code.google.com/p/swfobject/
      

  3. 我是播放WMV格式的视频文件呀!!!
      

  4. 我是播放WMV格式的视频文件呀!!!
      

类似问题 »