修改消息拉取记录
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user