网页播放器

关注公众号 jb51net

关闭
首页 > 网络编程 > 网页播放器 > 网页播放器 windowsmediaplay

网页播放器 windowsmediaplay中控制从wmv的指定时间开始播放,指定时间停止播放

作者:

windowsmediaplay中控制从wmv的指定时间开始播放,指定时间停止播放
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);
}
}
阅读全文