页面嵌入Windows Media Player播放器代码需要注意的

所属分类: 网络编程 / 网页编辑器 阅读数: 785
收藏 0 赞 0 分享

这里是WMP的版本ClassID,从WMP7后ID就成了clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6,之前的6.4为clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95,但是之前的版本还是可以用的,只不过新功能用不了罢了。

下面这个是具体的版本号,你可以对比一下你现在的是什么版本。

版本号              Windows Media Player (WMP) 的版本
----------------------------------------------------------------
5.1.51.421         WMP 5.2 Beta
5.1.52.701         WMP 5.2
6.02.902           WMP 6.0
6.1.5.130          WMP 6.0 Internet Explorer 5 RC0 Beta
6.1.7.217          WMP 6.0
6.2.5.410          WMP 6.2 Beta
6.4.5.809          WMP 6.4
6.4.6.*             WMP 6.4 for Windows 2000 Beta
6.4.7.1028          WMP 6.4,具有多位速率 (MBR) 更新,用于Internet Explorer
6.4.7.1112         WMP 6.4,具有 MBR 更新(在 6.4.7.1028 的基础上对错误消息进行了较小更新)
6.4.9.*              WMP 6.4,仅用于 Windows 2000
7.0.0.1954         WMP 7
7.0.0.1958         WMP 7 更新
7.0.0.1956         WMP 7,更新了安装程序
7.0.0.1440         WMP 7,用于 Windows Millennium Edition (Me)
7.01.00.3055       WMP 7.1
8.00.00.4477       WMP for Windows XP
9.00.00.2980      WMP 9 系列,用于 Windows XP、Windows 98 Second Edition、Windows Me 和 Windows 2000
9.00.00.2991        WMP 9 系列,用于 Windows Server 2003
10.00.00.3646     WMP 10

---------------------------------------------------------------------------------------------------------------

官方的插入方式真够简单的,我都有点想踹他们两脚,

<OBJECT ID="Player"
  CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
    <PARAM name="autoStart" value="True">
</OBJECT>
下面是具体参数在不同浏览器的可用性,这个东东真是太有用了,好多参数用了不起作用,我都测试的快疯了,一看这个列表,原来人家压根不支持,晕...

PARAM name Internet Explorer Firefox with mime type application/x-ms-wmp Firefox with any other mime type
autoStart yes yes yes
balance yes yes yes
baseURL yes yes yes
captioningID yes yes yes
currentMarker yes yes yes
currentPosition yes yes yes
defaultFrame yes no no
enableContextMenu yes yes yes
enabled yes yes yes
enableErrorDialogs yes yes no
fileName no yes yes
fullScreen yes no no
invokeURLs yes no no
mute yes yes yes
playCount yes yes no
rate yes yes yes
SAMIFileName yes yes yes
SAMILang yes yes yes
SAMIStyle yes yes yes
SRC no yes yes
stretchToFit yes yes no
URL yes yes yes
volume yes yes yes
windowlessVideo yes yes yes

 参数的默认值:

Parameter Default Description
AudioStream true  
AutoSize true  
AutoStart true Sets if the player should start automatically
AnimationAtStart true Sets if an animation should show while the file loads
AllowScan true  
AllowChangeDisplaySize true  
AutoRewind false  
Balance false  
BaseURL    
BufferingTime 5  
CaptioningID    
ClickToPlay true Sets if the player should start when the user clicks in the play area
CursorType false  
CurrentPosition true  
CurrentMarker false  
DefaultFrame    
DisplayBackColor false  
DisplayForeColor 16777215  
DisplayMode false  
DisplaySize false  
Enabled true  
EnableContextMenu true  
EnablePositionControls true  
EnableFullScreenControls false  
EnableTracker true  
Filename URL The URL of the file to play
InvokeURLs true  
Language true  
Mute false  
PlayCount 1  
PreviewMode false  
Rate 1  
SAMILang    
SAMIStyle    
SAMIFileName    
SelectionStart true  
SelectionEnd true  
SendOpenStateChangeEvents true  
SendWarningEvents true  
SendErrorEvents true  
SendKeyboardEvents false  
SendMouseClickEvents false  
SendMouseMoveEvents false  
SendPlayStateChangeEvents true  
ShowCaptioning false  
ShowControls true Sets if the player controls should show
ShowAudioControls true Sets if the audio controls should show
ShowDisplay false Sets if the display should show
ShowGotoBar false Sets if the GotoBar should show
ShowPositionControls true  
ShowStatusBar false  
ShowTracker true  
TransparantAtStart false  
VideoBorderWidth false  
VideoBorderColor false  
VideoBorder3D false  
Volume -200  
WindowlessVideo false  

 可能你最想知道的是怎么用程序(我偏向用JS)来控制WMP的播放、停止、快进吧,看看这里吧,http://msdn.microsoft.com/en-us/library/dd564034%28VS.85%29.aspx,有详细的说明和例子。(英文的)

更多精彩内容其他人还在看

FCKEditor常用Js代码,获取FCK内容,统计FCK字数,向FCK写入指定代码

FCKEditor常用Js代码,获取FCK内容,统计FCK字数,向FCK写入指定代码,使用FCKEditor的朋友可以参考下。增加编辑器的人性化功能。
收藏 0 赞 0 分享

CKEditor网页编辑器 中文使用说明

安装CKEditor是一件容易的工作,只需要按照下面的简单步骤就可以完成。多测试。
收藏 0 赞 0 分享

FCKeditor 和 SyntaxHighlighter 代码高亮插件的整合

FCKeditor 和 SyntaxHighlighter 代码高亮插件的整合方法,里面有下载,可以根据需要结合自己的fckeditor版本。
收藏 0 赞 0 分享

eWebEditor 请选择一个有效的文件的解决方法

解决eWebEditor上传图片提示 请选择一个有效的文件
收藏 0 赞 0 分享

Ewebeditor 不能粘贴或复制的解决方法

在调试网站后台时,遇见用EWEBEDITOR编辑内容时,不能从其他文件来源粘贴到里面.
收藏 0 赞 0 分享

javascript fckeditor编辑器取值与赋值实现代码

这篇文章对于使用fckeditor编辑器的朋友是个不错应用,主要介绍的是js对fckeditor的取值与赋值操作,fckeditor是个不错的比较方便的扩展功能的编辑器。
收藏 0 赞 0 分享

Html 编辑器粘贴内容过滤技术详解

最近在解决数据粘贴方面取得了不少进展,作为Html在线编辑器所必须具备的技术,在这里详细给大家介绍并提供实现参考。
收藏 0 赞 0 分享

Js FCKeditor的值获取和修改的代码小结

FCKeditor编辑器是比较流行的一款编辑器,很多cms系统都在使用,免费而功能强大。容易扩展等特性赢得了大家的喜爱。
收藏 0 赞 0 分享

22个国外的Web在线编辑器收集

本文搜集了 22 个 Web 在线编辑器,它们基本代表了当前 Web 编辑器的现状。
收藏 0 赞 0 分享

FCKeditor添加自定义按钮的方法

FCKLang是语言包对象,您只要打开FCK/editor/lang/下面的相应语言包添加相应的名称属性就可以了,比如:MyAlbum打开我的像册。注意大小写!至此我们的添加工作已完成。
收藏 0 赞 0 分享
查看更多