jwplayer.js视频播放器效果代码

代码语言:html

所属分类:多媒体

代码描述:jwplayer.js视频播放器效果代码

代码标签: jwplayer.js 视频 播放器

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" />
    <title>BFW NEW PAGE</title>
    <script id="bfwone" data="dep=jquery.17&err=0" type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/bfwone.js"></script>


    <script type="text/javascript">
        var thePlayer;  //保存当前播放器以便操作  
        bready(function() {
  

   use(["jwplayer"], function() {
               
        
        thePlayer = jwplayer('container').setup({  
           
            file: '//repo.bfw.wiki/bfwrepo/video/modushanghai.mp4',  
            width: 500,  
            height: 350,  
            dock: false  
        });  
          
        //播放 暂停  
        $('.player-play').click(function() {  
            if (thePlayer.getState() != 'PLAYING') {  
                thePlayer.play(true);  
                this.value = '暂停';  
            } else {  
                thePlayer.play(false);  
                this.value = '播放';  
            }  
        });  
          
        //停止  
        $('.player-stop').click(function() { thePlayer.stop(); });  
          
        //获取状态  
        $('.player-status').click(function() {  
            var state = thePlayer.getState();  
            var msg;  
            switch (state) {  
                case 'BUFFERING':  
                    msg = '加载中';  
                    break;  
                case 'PLAYING':  
                    msg = '正在播放';  
                    break;  
        .........完整代码请登录后点击上方下载按钮下载查看

网友评论0