修改默认条数

This commit is contained in:
haozq 2024-06-17 21:36:39 +08:00
parent 0e455b24a2
commit 0ba2fe60ea
3 changed files with 29 additions and 11 deletions

View File

@ -31,11 +31,21 @@ layui.config({
puid = puid.substring(0, puid.length - 2);
if (puid) {
parent.layer.msg("视频加载中,请稍候...", { icon: 16, scrollbar: false, time: 1000, });
let puidCz=true;
for (let i = 0; i < playList.length; i++) {
if( playList[i].puid==puid){
puidCz=false;
}
}
if(puidCz){
let newobj=getPlay(puid,getWindBox(),0);
playList.push(newobj);
playVideList();
}
console.log("4444");
console.log(playList);
playVideList();
// QXPlayVideo(puid, '0', winDom)
// playControl();
videoObject.devCode = puid;

View File

@ -34,6 +34,8 @@ function loadVideoTree() {
item.title = '<img src="../../img/video/ball_online.png"><span data-mtpis="'+item.title+'">' + titleName + '</span>'
if(isPlay){
let puid = item.id.replace('QJ', '').split("-")[0];
playList.push(getPlay(puid,winDom,0));
playVideList();
// QXPlayVideo(puid, '0', winDom)
@ -98,10 +100,16 @@ function fourVideo(){
}
nowDmoScree=4;
console.log(nowDmoScree);
if(playList.length>nowDmoScree){
playList=playList.slice(-nowDmoScree);
//console.log(nowDmoScree);
// if(playList.length>nowDmoScree){
// playList=playList.slice(-nowDmoScree);
// }
while (playList.length > nowDmoScree) {
console.log(playList[0].windBox)
destoryVideo(playList[0].flvPlayer);
playList.pop();
}
for (let i = 0; i <playList.length ; i++) {
QXPlayVideo(playList[i].puid, '0', playList[i].windBox);
playControl();

View File

@ -98,13 +98,13 @@ function QXPlayVideo(puId, idx, dom) {
flvPlayer.attachMediaElement(videoElement);
flvPlayer.load();
//init3D();
// flvPlayer.on(flvjs.Events.ERROR, (errorType, errorDetail, errorInfo) => {
// if (flvPlayer) {
// //播放失败销毁窗口
// destoryVideo(flvPlayer);
// videoObject.playState = false;
// }
// });
flvPlayer.on(flvjs.Events.ERROR, (errorType, errorDetail, errorInfo) => {
if (flvPlayer) {
//播放失败销毁窗口
destoryVideo(flvPlayer);
videoObject.playState = false;
}
});
setTimeout(function () {