diff --git a/dist.zip b/dist.zip new file mode 100644 index 00000000..8b4e684f Binary files /dev/null and b/dist.zip differ diff --git a/dist/index.html b/dist/index.html index 6941bc16..80fa4d3b 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1 +1 @@ -nouiroom
\ No newline at end of file +nouiroom
\ No newline at end of file diff --git a/src/views/room.vue b/src/views/room.vue index 3f512b57..df64a866 100644 --- a/src/views/room.vue +++ b/src/views/room.vue @@ -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(() => {