flx:视频监控新增码流切换

This commit is contained in:
Rain_ 2025-12-12 10:12:14 +08:00
parent 6244057a64
commit 5cccb8fe3f
4 changed files with 33 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -19,6 +19,18 @@
<div class="controls-bottom"> <div class="controls-bottom">
<div></div> <div></div>
<div> <div>
<el-tooltip
class="item"
effect="dark"
:content="`${devH5List[i - 1] && devH5List[i - 1].defaultStreamTypeCut ? '主' : '子'}码流`"
placement="top"
>
<div
class="bgImage codestream"
:class="{ codestream_active: devH5List[i - 1] && devH5List[i - 1].defaultStreamTypeCut }"
@click="isCodeStream(i)"
></div>
</el-tooltip>
<el-tooltip <el-tooltip
class="item" class="item"
effect="dark" effect="dark"
@ -160,6 +172,7 @@ export default {
const row = { const row = {
...item, ...item,
eIndex: this.iWndIndex, eIndex: this.iWndIndex,
defaultStreamTypeCut: item.defaultStreamType,
}; };
if (this.numCount == 1) { if (this.numCount == 1) {
this.play(row, this.iWndIndex); this.play(row, this.iWndIndex);
@ -178,13 +191,14 @@ export default {
{ {
...item, ...item,
eIndex: index, eIndex: index,
defaultStreamTypeCut: index > 3 ? 0 : item.defaultStreamType
}, },
index index
); );
} }
}); });
if (a.length > 1) { if (a.length > 1) {
this.devH5List = a.map((item, index) => ({ ...item, eIndex: index })); this.devH5List = a.map((item, index) => ({ ...item, eIndex: index, defaultStreamTypeCut: index > 3 ? 0 : item.defaultStreamType }));
} }
}, },
randomNumber: { randomNumber: {
@ -226,6 +240,7 @@ export default {
this.devH5List = this.devList.map((item, index) => ({ this.devH5List = this.devList.map((item, index) => ({
...item, ...item,
eIndex: index, eIndex: index,
defaultStreamTypeCut: index > 3 ? 0 : item.defaultStreamType
})); }));
console.log("我进来了", this.devList); console.log("我进来了", this.devList);
// ` // `
@ -248,12 +263,18 @@ export default {
this.devH5List = dataList.map((item, index) => ({ this.devH5List = dataList.map((item, index) => ({
...item, ...item,
eIndex: index, eIndex: index,
defaultStreamTypeCut: index > 3 ? 0 : item.defaultStreamType
})); }));
this.devH5List.forEach((item) => { this.devH5List.forEach((item) => {
this.play(item,item.eIndex); this.play(item,item.eIndex);
}) })
console.log("dataList", dataList, this.pageNo); console.log("dataList", dataList, this.pageNo);
}, },
isCodeStream(i){
console.log("isCodeStream", this.devH5List[i]);
this.devH5List[i - 1].defaultStreamTypeCut = this.devH5List[i - 1].defaultStreamTypeCut == 1 ? 0 : 1;
this.play(this.devH5List[i - 1], i - 1);
},
// //
stopAllPlay() { stopAllPlay() {
// API // API
@ -641,11 +662,14 @@ export default {
let tempCode = row.serialNumber; let tempCode = row.serialNumber;
const param = { const param = {
cameraIndexCode: tempCode, cameraIndexCode: tempCode,
streamType: row.defaultStreamType && row.eIndex < 4 ? row.defaultStreamType : "", streamType: row.defaultStreamType && row.eIndex < 4 ? (row.defaultStreamType == 1 ? "" : 2) : "",
type: window.location.protocol.includes("https") ? "wss" : "ws", type: window.location.protocol.includes("https") ? "wss" : "ws",
transmode: 1, transmode: 1,
itemId: row.itemId, itemId: row.itemId,
}; };
if(row.defaultStreamTypeCut == 0) {
param.streamType = 2;
}
// //
return getVideoItemInfoApi(param); return getVideoItemInfoApi(param);
}, },
@ -919,6 +943,12 @@ export default {
height: 20px; height: 20px;
background-image: url("~@/assets/images/iscImage/transcribe.png"); background-image: url("~@/assets/images/iscImage/transcribe.png");
} }
.codestream {
background-image: url("~@/assets/images/iscImage/codestream2.png");
}
.codestream_active {
background-image: url("~@/assets/images/iscImage/codestream1.png");
}
.talkback { .talkback {
background-image: url("~@/assets/images/iscImage/talkback.png"); background-image: url("~@/assets/images/iscImage/talkback.png");
} }

View File

@ -37,7 +37,7 @@
:isIframe="isIframe" :isIframe="isIframe"
:devList="devList" :devList="devList"
:devListAll="devListAll" :devListAll="devListAll"
v-if="!isWindows() && $store.state.forceH5Play == 0" v-if="isWindows() && $store.state.forceH5Play == 0"
:class="{ :class="{
isDockingToWoer: isDockingToWoer, isDockingToWoer: isDockingToWoer,
isLongguangIframe: isIframe, isLongguangIframe: isIframe,