欢迎光临
我们一直在努力

【网站代码】苹果CMSV10本地化DPLAYER增加记忆+P2P播放+自动下一集方法

为苹果CMSV10播放器增加记忆+P2P播放+自动下一集功能!
部分远程JS代码,博友可以自行本地化!但代码随时更新!建议使用远程JS代码!
话不多说,直接放代码!

[hide]

<html>
<head>
<title>dplayer播放器p2p加速+记忆播放</title>
<meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
<meta http-equiv="content-language" content="zh-CN"/>
<meta http-equiv="X-UA-Compatible" content="chrome=1"/>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta name="referrer" content="never"/>
<meta name="renderer" content="webkit"/>
<meta name="msapplication-tap-highlight" content="no"/>
<meta name="HandheldFriendly" content="true"/>
<meta name="x5-page-mode" content="app"/>
<meta name="Viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
<link rel="stylesheet" href="//www.seeso.cc/dplayerp2p/DPlayer.min.css" type="text/css"/>
<style type="text/css">
body,html{width:100%;height:100%;background:#000;padding:0;margin:0;overflow-x:hidden;overflow-y:hidden}
*{margin:0;border:0;padding:0;text-decoration:none}
#stats{position:fixed;top:5px;left:8px;font-size:12px;color:#fdfdfd;text-shadow:1px 1px 1px #000, 1px 1px 1px #000}
#dplayer{position:inherit}
</style>
</head>
<body style="background:#000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" oncontextmenu=window.event.returnValue=false>
<div id="dplayer"></div>
<div id="stats"></div>
  <!--<script type="text/javascript" src="//s.itemccmod.com/base/1ceebc89f2ca06eb619fb4de754b476c.js"></script>   -->
<script language="Javascript">
document.oncontextmenu=new Function("event.returnValue=false");
document.onselectstart=new Function("event.returnValue=false");
</script>
<script type="text/javascript" src="//www.seeso.cc/dplayerp2p/hls.min.js"></script>
<script type="text/javascript" src="//www.seeso.cc/dplayerp2p/flv.min.js"></script>
<script type="text/javascript" src="//www.seeso.cc/dplayerp2p/DPlayer.min.js"></script>
<script type="text/javascript" src="//www.seeso.cc/dplayerp2p/jquery.min.js"></script>
<script type="text/javascript" src="//www.seeso.cc/dplayerp2p/p2p.js"></script>
<script>
    var webdata = {
        set:function(key,val){
            window.sessionStorage.setItem(key,val);
        },
        get:function(key){
            return window.sessionStorage.getItem(key);
        },
        del:function(key){
            window.sessionStorage.removeItem(key);
        },
        clear:function(key){
            window.sessionStorage.clear();
        }
    };
     var dp = new DPlayer({
        autoplay: true,
        container: document.getElementById('dplayer'),
        video: {
           // url: m3u8url,
            url: parent.MacPlayer.PlayUrl,
            type: 'hls',
            pic: 'https://www.seeso.cc/webp2p/loading_wap.jpg',
          },
          volume: 1.0,

          preload: 'auto',
          screenshot: true,
          theme: '#28FF28',
        //danmaku: {
                //id: '<?php echo $url; ?>',
                //api: 'https://api.prprpr.me/dplayer/',
                //maximum: 1000,
                //bottom: '20%',
                //unlimited: true
       // },
        hlsjsConfig: {
            p2pConfig: {
                logLevel: true,
                live: false,
                announce: "https://tracker.cdnbye.com:8090/v1",
                wsSignalerAddr: 'wss://opensignal.cdnbye.com',
            }
        }
    });
    dp.seek(webdata.get('pay'+parent.MacPlayer.PlayUrl));
    setInterval(function(){
        webdata.set('pay'+parent.MacPlayer.PlayUrl,dp.video.currentTime);
    },1000);
    var _peerId = '', _peerNum = 0, _totalP2PDownloaded = 0, _totalP2PUploaded = 0;
    dp.on('stats', function (stats) {
        _totalP2PDownloaded = stats.totalP2PDownloaded;
        _totalP2PUploaded = stats.totalP2PUploaded;
        updateStats();
    });
    dp.on('peerId', function (peerId) {
        _peerId = peerId;
    });
    dp.on('peers', function (peers) {
        _peerNum = peers.length;
        updateStats();
    });
    dp.on('ended', function (){
        if(parent.MacPlayer.PlayLinkNext!=''){
            top.location.href = parent.MacPlayer.PlayLinkNext;
        }
    });

    function updateStats() {
        var text = 'P2P已开启 共享' + (_totalP2PUploaded/1024).toFixed(2) + 'MB' + ' 已加速' + (_totalP2PDownloaded/1024).toFixed(2)
            + 'MB' + ' 此片有 ' + _peerNum + ' 位影迷正在观看';
        document.getElementById('stats').innerText = text
    }
</script>
<span style="display: none;">
<script src="https://s19.cnzz.com/z_stat.php?id=1275012176&web_id=1275012176" language="JavaScript"></script>
</span>
</body>
</html>

[/hide] 
复制代码,替换static/player目录dplayer.html全部内容即可!
顺便发个完整的包!不会替换代码的直接下载压缩包,解压至static/player目录即可!
对你有用,请在下面给个赞!!

赞(1)
未经允许不得转载:阿强爱分享 » 【网站代码】苹果CMSV10本地化DPLAYER增加记忆+P2P播放+自动下一集方法

评论 8

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    我试试

    是撒2年前 (2019-06-29)回复
  2. #2

    感谢感谢

    自由WCHY2年前 (2019-08-13)回复
  3. #3

    111111这是中文

    momo2年前 (2019-10-19)回复
  4. #4

    -2年前 (2019-11-09)回复
  5. #5

    谢谢 正找呢

    3242年前 (2019-11-11)回复
  6. #6

    谢谢 正找呢 [F1] 蜀韵文学网想请教下作者!可以留个方式吗!想实现登陆播放!

    蜀韵文学网2年前 (2019-12-07)回复
  7. #7

    个人防护的发货的规范化的规范化风格

    主人2年前 (2019-12-22)回复
  8. #8

    上的瑕疵下次v

    zzz2年前 (2019-12-23)回复