网页播放器 windowsmediaplay中控制从wmv的指定时间开始播放,指定时间停止播放
程序员文章站
2022-06-18 15:41:54
1、mediaplay播放器插入方法 插入-媒体-activex 属性设置: classid:clsid:6bf52a52-394a-11d3-b153-00c04f79f...
1、mediaplay播放器插入方法
插入-媒体-activex
属性设置:
classid:clsid:6bf52a52-394a-11d3-b153-00c04f79faa6
参数:
url:文件路径名称
playcount :整数
autostart :自动播放:1 不播放:0
fullscreen :是否自动全屏 0不1是
volume :0-100
代码
1.window.media.player
<object classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" id="mediaplayer1" width="286" height="225">
<param name="audiostream" value="-1">
<param name="autosize" value="-1">
<param name="autostart" value="-1">
<param name="animationatstart" value="-1">
<param name="allowscan" value="-1">
<param name="allowchangedisplaysize" value="-1">
<param name="autorewind" value="0">
<param name="balance" value="0">
<param name="baseurl" value>
<param name="bufferingtime" value="5">
<param name="captioningid" value>
<param name="clicktoplay" value="-1">
<param name="cursortype" value="0">
<param name="currentposition" value="-1">
<param name="currentmarker" value="0">
<param name="defaultframe" value>
<param name="displaybackcolor" value="0">
<param name="displayforecolor" value="16777215">
<param name="displaymode" value="0">
<param name="displaysize" value="0">
<param name="enabled" value="-1">
<param name="enablecontextmenu" value="-1">
<param name="enablepositioncontrols" value="-1">
<param name="enablefullscreencontrols" value="0">
<param name="enabletracker" value="-1">
<param name="filename" value="你的多媒体文件名">
<param name="invokeurls" value="-1">
<param name="language" value="-1">
<param name="mute" value="0">
<param name="playcount" value="1">
<param name="previewmode" value="0">
<param name="rate" value="1">
<param name="samilang" value>
<param name="samistyle" value>
<param name="samifilename" value>
<param name="selectionstart" value="-1">
<param name="selectionend" value="-1">
<param name="sendopenstatechangeevents" value="-1">
<param name="sendwarningevents" value="-1">
<param name="senderrorevents" value="-1">
<param name="sendkeyboardevents" value="0">
<param name="sendmouseclickevents" value="0">
<param name="sendmousemoveevents" value="0">
<param name="sendplaystatechangeevents" value="-1">
<param name="showcaptioning" value="0">
<param name="showcontrols" value="-1">
<param name="showaudiocontrols" value="-1">
<param name="showdisplay" value="0">
<param name="showgotobar" value="0">
<param name="showpositioncontrols" value="-1">
<param name="showstatusbar" value="0">
<param name="showtracker" value="-1">
<param name="transparentatstart" value="0">
<param name="videoborderwidth" value="0">
<param name="videobordercolor" value="0">
<param name="videoborder3d" value="0">
<param name="volume" value="-320">
<param name="windowlessvideo" value="0">
</object>
里面的selectionstart selectionend是如何用的,可否控制wmv从一个指定的帧开始,到一个指定的帧结束。
请高手作答,谢谢
--------------------------------------
<param name="currentposition" value="200">
这里设置为视频开始播放的时间
页面onload=setpause()
function setpause(){
settimeout("pause()",1000);
}
function pause(){
var current_time = document.getelementbyid("mediaplayer1").controls.currentposition;
if (current_time>parseint('1261.230')){
toplay();
}else{
settimeout("pause()",1000);
}
}
插入-媒体-activex
属性设置:
classid:clsid:6bf52a52-394a-11d3-b153-00c04f79faa6
参数:
url:文件路径名称
playcount :整数
autostart :自动播放:1 不播放:0
fullscreen :是否自动全屏 0不1是
volume :0-100
代码
1.window.media.player
<object classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" id="mediaplayer1" width="286" height="225">
<param name="audiostream" value="-1">
<param name="autosize" value="-1">
<param name="autostart" value="-1">
<param name="animationatstart" value="-1">
<param name="allowscan" value="-1">
<param name="allowchangedisplaysize" value="-1">
<param name="autorewind" value="0">
<param name="balance" value="0">
<param name="baseurl" value>
<param name="bufferingtime" value="5">
<param name="captioningid" value>
<param name="clicktoplay" value="-1">
<param name="cursortype" value="0">
<param name="currentposition" value="-1">
<param name="currentmarker" value="0">
<param name="defaultframe" value>
<param name="displaybackcolor" value="0">
<param name="displayforecolor" value="16777215">
<param name="displaymode" value="0">
<param name="displaysize" value="0">
<param name="enabled" value="-1">
<param name="enablecontextmenu" value="-1">
<param name="enablepositioncontrols" value="-1">
<param name="enablefullscreencontrols" value="0">
<param name="enabletracker" value="-1">
<param name="filename" value="你的多媒体文件名">
<param name="invokeurls" value="-1">
<param name="language" value="-1">
<param name="mute" value="0">
<param name="playcount" value="1">
<param name="previewmode" value="0">
<param name="rate" value="1">
<param name="samilang" value>
<param name="samistyle" value>
<param name="samifilename" value>
<param name="selectionstart" value="-1">
<param name="selectionend" value="-1">
<param name="sendopenstatechangeevents" value="-1">
<param name="sendwarningevents" value="-1">
<param name="senderrorevents" value="-1">
<param name="sendkeyboardevents" value="0">
<param name="sendmouseclickevents" value="0">
<param name="sendmousemoveevents" value="0">
<param name="sendplaystatechangeevents" value="-1">
<param name="showcaptioning" value="0">
<param name="showcontrols" value="-1">
<param name="showaudiocontrols" value="-1">
<param name="showdisplay" value="0">
<param name="showgotobar" value="0">
<param name="showpositioncontrols" value="-1">
<param name="showstatusbar" value="0">
<param name="showtracker" value="-1">
<param name="transparentatstart" value="0">
<param name="videoborderwidth" value="0">
<param name="videobordercolor" value="0">
<param name="videoborder3d" value="0">
<param name="volume" value="-320">
<param name="windowlessvideo" value="0">
</object>
里面的selectionstart selectionend是如何用的,可否控制wmv从一个指定的帧开始,到一个指定的帧结束。
请高手作答,谢谢
--------------------------------------
<param name="currentposition" value="200">
这里设置为视频开始播放的时间
页面onload=setpause()
function setpause(){
settimeout("pause()",1000);
}
function pause(){
var current_time = document.getelementbyid("mediaplayer1").controls.currentposition;
if (current_time>parseint('1261.230')){
toplay();
}else{
settimeout("pause()",1000);
}
}
下一篇: html中插入wmv格式视频文件的代码