gyj пре 2 година
родитељ
комит
c678ede9f5
3 измењених фајлова са 11 додато и 4 уклоњено
  1. BIN
      dist.zip
  2. 1
    1
      dist/index.html
  3. 10
    3
      src/views/room.vue

+ 1
- 1
dist/index.html Прегледај датотеку

@@ -1 +1 @@
1
-<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>nouiroom</title><script src="https://api.xayunmei.com/onlyOffice/web-apps/apps/api/documents/api.js"></script><script defer="defer" src="/js/chunk-vendors.5307e452.js"></script><script defer="defer" src="/js/app.41e65d09.js"></script><link href="/css/chunk-vendors.10dd4e95.css" rel="stylesheet"><link href="/css/app.b59bb92e.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but nouiroom doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
1
+<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>nouiroom</title><script defer="defer" src="/js/chunk-vendors.5307e452.js"></script><script defer="defer" src="/js/app.7dd34254.js"></script><link href="/css/chunk-vendors.10dd4e95.css" rel="stylesheet"><link href="/css/app.b59bb92e.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but nouiroom doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

+ 10
- 3
src/views/room.vue Прегледај датотеку

@@ -316,6 +316,10 @@ export default {
316 316
       // this.videoList = "videoList1";
317 317
       // this.videoClass = "videoItem2";
318 318
       // this.screenShareFlag = true;
319
+      if(this.screenShareFlag){
320
+        alert("其他用户已经分享")
321
+        return
322
+      }
319 323
       await trtc.startScreenShare().then(() => {
320 324
         this.sharFlag = false;
321 325
       });
@@ -505,10 +509,13 @@ export default {
505 509
           setTimeout(() => {
506 510
             trtc.startRemoteVideo({ userId, streamType, view: `${userId}` });
507 511
           });
508
-        } else if (streamType == "main") {
509
-          trtc.startRemoteVideo({ userId, streamType, view: "screenShare" });
510
-          this.videoList = "videoList1";
512
+        } else if (streamType == "sub") {
513
+          setTimeout(()=>{
514
+            trtc.startRemoteVideo({ userId, streamType, view: "screenShare" }).then(()=>{
515
+              this.videoList = "videoList1";
511 516
           this.videoClass = "videoItem2";
517
+            });
518
+          })
512 519
           this.screenShareFlag = true;
513 520
         }
514 521
         setTimeout(() => {