修改播放默认线路
This commit is contained in:
@@ -407,9 +407,21 @@ href='https://{$DomainModel->d_domain}{site:vpurl v_id="$arrVideo.v_id" v_py="$a
|
||||
var intJumpTimeTwoEnd = 1;
|
||||
var arrPlayUrl = {$arrVideo.v_play_url|json_encode|raw} ;
|
||||
var strPlayUrl = ""
|
||||
|
||||
|
||||
|
||||
|
||||
function reorderObj(obj) {
|
||||
if (!obj || typeof obj !== 'object') return obj;
|
||||
let newObj = {};
|
||||
if (obj.hasOwnProperty('douban')) {
|
||||
newObj['douban'] = obj['douban'];
|
||||
}
|
||||
for (let key in obj) {
|
||||
if (key !== 'douban' && obj.hasOwnProperty(key)) {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
return newObj;
|
||||
}
|
||||
arrPlayUrl = reorderObj(arrPlayUrl);
|
||||
</script>
|
||||
{/block}
|
||||
|
||||
@@ -421,9 +433,6 @@ href='https://{$DomainModel->d_domain}{site:vpurl v_id="$arrVideo.v_id" v_py="$a
|
||||
{block name="footer-js"}
|
||||
<script type="text/javascript" src="/public/video/hls.min.js" defer></script>
|
||||
<script type="text/javascript" src="/public/video/DPlayer.min.js" defer></script>
|
||||
<!-- <script type="text/javascript"
|
||||
src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/hls.js/1.1.5-0.canary.8257/hls.min.js" defer></script> -->
|
||||
<!-- <script type="text/javascript" src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/dplayer/1.26.0/DPlayer.min.js"
|
||||
defer></script> -->
|
||||
|
||||
|
||||
{/block}
|
||||
@@ -636,9 +636,8 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
if (typeof strPlayType !== "undefined"){
|
||||
if (strPlayType == 'default') {
|
||||
console.log(arrPlayUrl)
|
||||
strPlayUrl = findFirstUrl(arrPlayUrl)
|
||||
// checkLine(strPlayType);
|
||||
checkLine('douban');
|
||||
} else {
|
||||
var ActivePlayUrl = arrPlayUrl[strPlayType][intPlayUrlIndex - 1]
|
||||
strPlayUrl = ActivePlayUrl.url
|
||||
|
||||
Reference in New Issue
Block a user