网站中使用windows media player。是很常见的,很好的运用windows media player,依靠JavaScript,下面就看看JavaScript控制windows media player一些信息。

?View Code JAVASCRIPT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
      &lt;object <span style="color: #ff0000">id="Player"</span> width="240" height="180" classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6"&gt;
        &lt;param name="URL" value="wangwei.wmv"&gt;
        &lt;param name="autoStart" value="false"&gt;
        &lt;param name="balance" value="0"&gt;
        &lt;param name="baseURL" value&gt;
        &lt;param name="captioningID" value&gt;
        &lt;param name="currentPosition" value="0"&gt;
        &lt;param name="currentMarker" value="0"&gt;
        &lt;param name="defaultFrame" value&gt;
        &lt;param name="enabled" value="1"&gt;
        &lt;param name="enableErrorDialogs" value="0"&gt;
        &lt;param name="enableContextMenu" value="1"&gt;
        &lt;param name="fullScreen" value="0"&gt;
        &lt;param name="invokeURLs" value="1"&gt;
        &lt;param name="mute" value="0"&gt;
        &lt;param name="playCount" value="1"&gt;
        &lt;param name="rate" value="1"&gt;
        &lt;param name="SAMIStyle" value&gt;
        &lt;param name="SAMILang" value&gt;
        &lt;param name="SAMIFilename" value&gt;
        &lt;param name="stretchToFit" value="0"&gt;
        &lt;param name="uiMode" value="none"&gt;
        &lt;param name="volume" value="100"&gt;
        &lt;param name="windowlessVideo" value="0"&gt;
 
        &lt;param name="BufferingTime" value="15"&gt;&lt;!--设置视频缓存时间--&gt;
      &lt;/object&gt;
属性/方法名: 说明:
[基本属性]  
URL:String; 指定媒体位置,本机或网络地址
uiMode:String; 播放器界面模式,可为Full, Mini, None, Invisible
playState:integer; 播放状态,1=停止,2=暂停,3=播放,6=正在缓冲,9=正在连接,10=准备就绪
enableContextMenu:Boolean; 启用/禁用右键菜单
fullScreen:boolean; 是否全屏显示
[controls] wmp.controls //播放器基本控制
controls.play; 播放
controls.pause; 暂停
controls.stop; 停止
controls.currentPosition:double; 当前进度
controls.currentPositionString:string; 当前进度,字符串格式。如“00:23”
controls.fastForward; 快进
controls.fastReverse; 快退
controls.next; 下一曲
controls.previous; 上一曲
[settings] wmp.settings //播放器基本设置
settings.volume:integer; 音量,0-100
settings.autoStart:Boolean; 是否自动播放
settings.mute:Boolean; 是否静音
settings.playCount:integer; 播放次数
[currentMedia] wmp.currentMedia //当前媒体属性
currentMedia.duration:double; 媒体总长度
currentMedia.durationString:string; 媒体总长度,字符串格式。如“03:24”
currentMedia.getItemInfo(const string); 获取当前媒体信息”Title”=媒体标题,”Author”=艺术家,”Copyright”=版权信息,”Description”=媒体内容描述,”Duration”=持续时间(秒),”FileSize”=文件大小,”FileType”=文件类型,”sourceURL”=原始地址
currentMedia.setItemInfo(const string); 通过属性名设置媒体信息
currentMedia.name:string; 同 currentMedia.getItemInfo(“Title”)
[currentPlaylist] wmp.currentPlaylist //当前播放列表属性
currentPlaylist.count:integer; 当前播放列表所包含媒体数
currentPlaylist.Item[integer]; 获取或设置指定项目媒体信息,其子属性同wmp.currentMedia
技术文档2010/03/15
  • 文章评论
  • Very nice style and great written content , absolutely nothing else we need : D.

  • I think, that you are mistaken. Let’s discuss.

  • Remarkable document as well as convenient in order to comprehend justification. Exactly how can We start gaining concur in order to put up part from the guide during my coming bulletin? Getting good credit score for you the actual publisher as well as web page link towards the websites won’t be considered a challenge.

  • I have removed this idea :) baa

  • It’s the pity you actually don’t possess a donate switch! I’d most likely donate to this superior site! We suppose that for now i’ll are satisfied with book-marking as well as adding your own Rss feed in order to my personal Search engines accounts. We appear forth in order to recent posts and can show this particular web page along with my personal Myspace group:

  • iphone 4 unlock
    how to unlock iphone 4
    unlock iphone 4

  • Very interesting and amusing subject. I read with great pleasure.

  • Are you a professional journalist? You write very well.

发表评论

You must be logged in to post a comment.