修改默认条数
This commit is contained in:
parent
0e8cbe40a8
commit
23cf859377
|
|
@ -115,7 +115,9 @@ function getWindBox(){
|
|||
}
|
||||
if(playList.length>nowDmoScree){
|
||||
console.log(playList[0].windBox)
|
||||
destoryVideo(playList[0].flvPlayer)
|
||||
if(playList[0].flvPlayer){
|
||||
destoryVideo(playList[0].flvPlayer)
|
||||
}
|
||||
playList.pop();
|
||||
}
|
||||
let obj=playList[0]
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ function oneVideo(that){
|
|||
})
|
||||
$(that).addClass('checkBtn');
|
||||
for (let i = 2; i < 5; i++) {
|
||||
document.getElementById("windowbox" + i).style.cssText = "width: 48.5%;height: 48.8%;";
|
||||
document.getElementById("videoPlayer"+i).style.cssText = "width: 100%;height: 100%;";
|
||||
document.getElementById("windowbox" + i).style.cssText = "width: 48.5%;height: 45.8%;";
|
||||
document.getElementById("videoPlayer"+i).style.cssText = "width: 100%;height: 90%;";
|
||||
$('.video'+i+'-dimensions').css("width", "100%");
|
||||
$('.video'+i+'-dimensions').css("height", "100%");
|
||||
document.getElementById("windowbox" + i).style.display = "none";
|
||||
|
|
@ -81,7 +81,9 @@ function oneVideo(that){
|
|||
nowDmoScree=1;
|
||||
while (playList.length > nowDmoScree) {
|
||||
console.log(playList[0].windBox)
|
||||
destoryVideo(playList[0].flvPlayer);
|
||||
if(playList[0].flvPlayer){
|
||||
destoryVideo(playList[0].flvPlayer);
|
||||
}
|
||||
playList.pop();
|
||||
}
|
||||
//播放
|
||||
|
|
@ -101,7 +103,7 @@ function fourVideo(that){
|
|||
})
|
||||
$(that).addClass('checkBtn');
|
||||
for (let i = 1; i < 5; i++) {
|
||||
document.getElementById("windowbox" + i).style.cssText = "width: 48.5%;height: 48.8%;";
|
||||
document.getElementById("windowbox" + i).style.cssText = "width: 48.5%;height: 46.8%;";
|
||||
document.getElementById("videoPlayer"+i).style.cssText = "width: 100%;height: 100%;";
|
||||
$('.video'+i+'-dimensions').css("width", "100%");
|
||||
$('.video'+i+'-dimensions').css("height", "100%");
|
||||
|
|
@ -109,20 +111,19 @@ function fourVideo(that){
|
|||
}
|
||||
|
||||
nowDmoScree=4;
|
||||
//console.log(nowDmoScree);
|
||||
// if(playList.length>nowDmoScree){
|
||||
// playList=playList.slice(-nowDmoScree);
|
||||
// }
|
||||
console.log(playList)
|
||||
while (playList.length > nowDmoScree) {
|
||||
console.log(playList[0].windBox)
|
||||
destoryVideo(playList[0].flvPlayer);
|
||||
if(playList[0].flvPlayer){
|
||||
destoryVideo(playList[0].flvPlayer);
|
||||
}
|
||||
playList.pop();
|
||||
}
|
||||
|
||||
for (let i = 0; i <playList.length ; i++) {
|
||||
QXPlayVideo(playList[i].puid, '0', playList[i].windBox);
|
||||
playControl();
|
||||
}
|
||||
playVideList();
|
||||
// for (let i = 0; i <playList.length ; i++) {
|
||||
// QXPlayVideo(playList[i].puid, '0', playList[i].windBox);
|
||||
// playControl();
|
||||
// }
|
||||
for (var i = 5; i <= 9; i++) {
|
||||
document.getElementById("windowbox" + i).style.display = "none";
|
||||
}
|
||||
|
|
@ -132,8 +133,10 @@ function fourVideo(that){
|
|||
|
||||
function playVideList(){
|
||||
console.log(playList)
|
||||
if(playList.length>nowDmoScree){
|
||||
playList=playList.slice(-nowDmoScree);
|
||||
|
||||
while (playList.length > nowDmoScree) {
|
||||
destoryVideo(playList[0].flvPlayer);
|
||||
playList.pop();
|
||||
}
|
||||
console.log(playList)
|
||||
for (let i = 0; i <playList.length ; i++) {
|
||||
|
|
|
|||
|
|
@ -74,15 +74,12 @@ function getQXConnect() {
|
|||
* @param dom 窗口id
|
||||
*/
|
||||
function QXPlayVideo(puId, idx, dom) {
|
||||
//播视频接口
|
||||
console.log(flvPlayer);
|
||||
console.log(dom);
|
||||
// destoryVideo(flvPlayer);
|
||||
let myPlayer=null;
|
||||
let url = qxUrl + "stream.flv?puid=" + puId + "&idx=" + idx + "&stream=0&token=" + qxToken;
|
||||
if (flvjs.isSupported()) {
|
||||
let videoElement = document.getElementById(dom);
|
||||
if (videoElement) {
|
||||
flvPlayer = flvjs.createPlayer({
|
||||
let myPlayer = flvjs.createPlayer({
|
||||
type: 'flv', // => 媒体类型 flv 或 mp4,m3u8
|
||||
isLive: true, // => 是否为直播流
|
||||
hasAudio: false, // => 是否开启声音
|
||||
|
|
@ -95,19 +92,19 @@ function QXPlayVideo(puId, idx, dom) {
|
|||
stashInitialSize: 128, // 减少首桢显示等待时长
|
||||
statisticsInfoReportInterval: 600
|
||||
});
|
||||
flvPlayer.attachMediaElement(videoElement);
|
||||
flvPlayer.load();
|
||||
myPlayer.attachMediaElement(videoElement);
|
||||
myPlayer.load();
|
||||
//init3D();
|
||||
flvPlayer.on(flvjs.Events.ERROR, (errorType, errorDetail, errorInfo) => {
|
||||
if (flvPlayer) {
|
||||
destoryVideo(flvPlayer);
|
||||
myPlayer.on(flvjs.Events.ERROR, (errorType, errorDetail, errorInfo) => {
|
||||
if (myPlayer) {
|
||||
destoryVideo(myPlayer);
|
||||
videoObject.playState = false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
setTimeout(function () {
|
||||
flvPlayer.play();
|
||||
myPlayer.play();
|
||||
}, 200);
|
||||
// flvPlayer.on(flvjs.Events.SCRIPTDATA_ARRIVED, (errorType, errorDetail, errorInfo) => {
|
||||
// if (flvPlayer) {
|
||||
|
|
@ -130,7 +127,7 @@ function QXPlayVideo(puId, idx, dom) {
|
|||
|
||||
}
|
||||
|
||||
return flvPlayer;
|
||||
return myPlayer;
|
||||
}
|
||||
}
|
||||
function init3D() {
|
||||
|
|
|
|||
|
|
@ -67,9 +67,9 @@
|
|||
</div>
|
||||
<div id="pro-risk">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="6" id="weekDate">周风险</td>
|
||||
</tr>
|
||||
<!-- <tr>-->
|
||||
<!-- <td colspan="6" id="weekDate">周风险</td>-->
|
||||
<!-- </tr>-->
|
||||
<tr>
|
||||
<td>名称/风险等级</td>
|
||||
<td>二级</td>
|
||||
|
|
@ -79,7 +79,9 @@
|
|||
<td>总数</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>周风险</td>
|
||||
<td> 本周风险
|
||||
(2024-06-17~2024-06-23)
|
||||
</td>
|
||||
<td id="twoRiskNum">0</td>
|
||||
<td id="threeRiskNum">0</td>
|
||||
<td id="fourRiskNum">0</td>
|
||||
|
|
@ -87,7 +89,9 @@
|
|||
<td id="totalRiskNum">0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>站班会</td>
|
||||
<td> 当日站班会
|
||||
(2024-06-18)
|
||||
</td>
|
||||
<td id="twoClassNum">0</td>
|
||||
<td id="threeClassNum">0</td>
|
||||
<td id="fourClassNum">0</td>
|
||||
|
|
|
|||
|
|
@ -110,12 +110,9 @@
|
|||
</div>
|
||||
<div id="center-box">
|
||||
<div id="video-box">
|
||||
<div id="balla" class="split split-horizontal">
|
||||
<div style="margin-left: 46%;margin-top: 3%;" class="toggle-btn">
|
||||
<button onclick="oneVideo(this)" class="checkBtn">1</button>
|
||||
<button onclick="fourVideo(this)" class="nocheckBtn">4</button>
|
||||
</div>
|
||||
<div class="layout" style="width: 100%;height: 93%;flex-wrap: wrap;">
|
||||
<div id="balla" class="split split-horizontal" style="margin-top: 20px;">
|
||||
|
||||
<div class="layout" style="width: 100%;height: 95%;flex-wrap: wrap;">
|
||||
<div id="windowbox1" class="ballsplit " ondblclick="ballScreenBig('1')"
|
||||
style="width: 100%;height: 100%; position: relative;z-index: 9999999999;pointer-events:auto;">
|
||||
<video id="videoPlayer1" class="ball-content" autoplay="autoplay" loop="loop" muted
|
||||
|
|
@ -137,6 +134,10 @@
|
|||
controls="controls"></video>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-left: 46%;margin-top: -10px;" class="toggle-btn">
|
||||
<button onclick="oneVideo(this)" class="checkBtn">1</button>
|
||||
<button onclick="fourVideo(this)" class="nocheckBtn">4</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue