javascritp可以方面的控制播放器 进行 播放/暂停 停止 提高音量 减少音量 前进n秒 后退n秒 等. 都封装好 , 很容易进行调用.
效果可以在作者网站上看到:http://www.jeroenwijering.com/extras/javascript.html
还提供了在线定制:http://www.jeroenwijering.com/extras/wizard.html
添加播放器代码如下:
<div id="myPlayer" style="float:left"><a href="http://www.macromedia.com/go/getflashplayer">
Get the Flash Player</a> to see this player.</div>
<script type="text/javascript">
//播放器 , 播放器ID,宽 , 高,
var s1 = new SWFObject("mediaplayer.swf","player_id","300","300","7");
s1.addParam("allowfullscreen","true");//是否允许全屏播放
//s1.addVariable("file","video.flv");//单文件播放
s1.addVariable("file","playlist.xml");//列表播放
s1.addVariable("image","preview.jpg");//背景图片
s1.addVariable("displayheight","200");//播放区域高度
s1.addVariable("backcolor","0x000000");
s1.addVariable("frontcolor","0xCCCCCC");
s1.addVariable("lightcolor","0x557722");
s1.addVariable("enablejs","true");//是否允许javascript脚本控制flash
s1.addVariable("javascriptid","javascript_id");//控制脚本javascriptid
s1.write("myPlayer");//将播放器写入到myPlayer
</script>
Get the Flash Player</a> to see this player.</div>
<script type="text/javascript">
//播放器 , 播放器ID,宽 , 高,
var s1 = new SWFObject("mediaplayer.swf","player_id","300","300","7");
s1.addParam("allowfullscreen","true");//是否允许全屏播放
//s1.addVariable("file","video.flv");//单文件播放
s1.addVariable("file","playlist.xml");//列表播放
s1.addVariable("image","preview.jpg");//背景图片
s1.addVariable("displayheight","200");//播放区域高度
s1.addVariable("backcolor","0x000000");
s1.addVariable("frontcolor","0xCCCCCC");
s1.addVariable("lightcolor","0x557722");
s1.addVariable("enablejs","true");//是否允许javascript脚本控制flash
s1.addVariable("javascriptid","javascript_id");//控制脚本javascriptid
s1.write("myPlayer");//将播放器写入到myPlayer
</script>
我整理注释了一下 , 直接下载后就可以使用 附件
需要在IIS里面看 且2003下需要添加.FLV 后缀的mine类型