共享人数限制

This commit is contained in:
gyj
2024-04-22 13:36:02 +08:00
parent eeb3ae6e1c
commit c678ede9f5
3 changed files with 11 additions and 4 deletions
+10 -3
View File
@@ -316,6 +316,10 @@ export default {
// this.videoList = "videoList1";
// this.videoClass = "videoItem2";
// this.screenShareFlag = true;
if(this.screenShareFlag){
alert("其他用户已经分享")
return
}
await trtc.startScreenShare().then(() => {
this.sharFlag = false;
});
@@ -505,10 +509,13 @@ export default {
setTimeout(() => {
trtc.startRemoteVideo({ userId, streamType, view: `${userId}` });
});
} else if (streamType == "main") {
trtc.startRemoteVideo({ userId, streamType, view: "screenShare" });
this.videoList = "videoList1";
} else if (streamType == "sub") {
setTimeout(()=>{
trtc.startRemoteVideo({ userId, streamType, view: "screenShare" }).then(()=>{
this.videoList = "videoList1";
this.videoClass = "videoItem2";
});
})
this.screenShareFlag = true;
}
setTimeout(() => {