修改播放默认线路
This commit is contained in:
@@ -408,8 +408,20 @@ href='https://{$DomainModel->d_domain}{site:vpurl v_id="$arrVideo.v_id" v_py="$a
|
|||||||
var arrPlayUrl = {$arrVideo.v_play_url|json_encode|raw} ;
|
var arrPlayUrl = {$arrVideo.v_play_url|json_encode|raw} ;
|
||||||
var strPlayUrl = ""
|
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>
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
@@ -421,9 +433,6 @@ href='https://{$DomainModel->d_domain}{site:vpurl v_id="$arrVideo.v_id" v_py="$a
|
|||||||
{block name="footer-js"}
|
{block name="footer-js"}
|
||||||
<script type="text/javascript" src="/public/video/hls.min.js" defer></script>
|
<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="/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}
|
{/block}
|
||||||
@@ -636,9 +636,8 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
|
|
||||||
if (typeof strPlayType !== "undefined"){
|
if (typeof strPlayType !== "undefined"){
|
||||||
if (strPlayType == 'default') {
|
if (strPlayType == 'default') {
|
||||||
console.log(arrPlayUrl)
|
|
||||||
strPlayUrl = findFirstUrl(arrPlayUrl)
|
strPlayUrl = findFirstUrl(arrPlayUrl)
|
||||||
// checkLine(strPlayType);
|
checkLine('douban');
|
||||||
} else {
|
} else {
|
||||||
var ActivePlayUrl = arrPlayUrl[strPlayType][intPlayUrlIndex - 1]
|
var ActivePlayUrl = arrPlayUrl[strPlayType][intPlayUrlIndex - 1]
|
||||||
strPlayUrl = ActivePlayUrl.url
|
strPlayUrl = ActivePlayUrl.url
|
||||||
|
|||||||
Reference in New Issue
Block a user