애플 CMSV10 현지화 DPLAYER 메모리 증가 + P2P 재생 + 자동 다음 편 방법

28936 단어
애플 CMSV10 플레이어에 메모리 증가 + P2P 재생 + 자동 다음 기능 추가!
일부 원격 JS 코드, 블로거는 자체적으로 현지화할 수 있습니다!하지만 코드는 수시로 업데이트됩니다!원격 JS 코드를 사용하는 것이 좋습니다!
말을 많이 하지 말고 바로 코드를 넣으세요!
<!--    ,  ,        ,      ,         -->
<!--    (  )    www.23zhui.com       -->
<!--              -->

<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: '',
                //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>
</body>
</html>

, static/player 디렉토리 dplayer를 대체합니다.html 전체 내용!
당신에게 유용하니 아래에서 좋아요를 주세요!!https://www.23zhui.com

좋은 웹페이지 즐겨찾기