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></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
class="item"
effect="dark"
@ -160,6 +172,7 @@ export default {
const row = {
...item,
eIndex: this.iWndIndex,
defaultStreamTypeCut: item.defaultStreamType,
};
if (this.numCount == 1) {
this.play(row, this.iWndIndex);
@ -178,13 +191,14 @@ export default {
{
...item,
eIndex: index,
defaultStreamTypeCut: index > 3 ? 0 : item.defaultStreamType
},
index
);
}
});
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: {
@ -226,6 +240,7 @@ export default {
this.devH5List = this.devList.map((item, index) => ({
...item,
eIndex: index,
defaultStreamTypeCut: index > 3 ? 0 : item.defaultStreamType
}));
console.log("我进来了", this.devList);
// `
@ -248,12 +263,18 @@ export default {
this.devH5List = dataList.map((item, index) => ({
...item,
eIndex: index,
defaultStreamTypeCut: index > 3 ? 0 : item.defaultStreamType
}));
this.devH5List.forEach((item) => {
this.play(item,item.eIndex);
})
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() {
// API
@ -641,11 +662,14 @@ export default {
let tempCode = row.serialNumber;
const param = {
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",
transmode: 1,
itemId: row.itemId,
};
if(row.defaultStreamTypeCut == 0) {
param.streamType = 2;
}
//
return getVideoItemInfoApi(param);
},
@ -919,6 +943,12 @@ export default {
height: 20px;
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 {
background-image: url("~@/assets/images/iscImage/talkback.png");
}

View File

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