修改消息拉取记录

This commit is contained in:
2023-12-04 22:25:19 +08:00
parent 6f690c1987
commit d2a3af7f1f
4 changed files with 262 additions and 110 deletions

View File

@@ -92,6 +92,8 @@ export default {
isForce: "0",
hasVideo: "1",
callSessionId: "",
callStatus: "watting",//房间状态
callRoomInfoRequetTimes:0,//房间拉取次数
};
},
mounted() {
@@ -434,7 +436,10 @@ export default {
}).then(res => {
if (res.status == 200) {
this.generateVideoRoomStream(res.data.data)
}else {
this.generateVideoRoomStream([])
}
//TODO 增加网络异常时候的处理
})
},
leaveRoom() {
@@ -527,6 +532,14 @@ export default {
})
},
generateVideoRoomStream(videoList) {
this.callRoomInfoRequetTimes=this.callRoomInfoRequetTimes+1;
if(this.callRoomInfoRequetTimes>5){
if(videoList.length==0){
// 拉取5次房间列表之后如果房间里面视频流的数量为0则关掉房间
this.videoDownAction()
}
}
let hasUpdate = false;
if (this.oldVideoStreamList == null) {
this.oldVideoStreamList = videoList;