From 429817b8c4937b1601fe7e824e81bbe3c965d367 Mon Sep 17 00:00:00 2001
From: panlinlin <648540858@qq.com>
Date: 星期四, 06 五月 2021 10:44:16 +0800
Subject: [PATCH] 修复分享功能

---
 web_src/src/components/dialog/rtcPlayer.vue |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/web_src/src/components/dialog/rtcPlayer.vue b/web_src/src/components/dialog/rtcPlayer.vue
index a7c0212..75c18f3 100644
--- a/web_src/src/components/dialog/rtcPlayer.vue
+++ b/web_src/src/components/dialog/rtcPlayer.vue
@@ -17,9 +17,13 @@
     },
     props: ['videoUrl', 'error', 'hasaudio'],
     mounted () {
+      let paramUrl = decodeURIComponent(this.$route.params.url)
        this.$nextTick(() =>{
-           console.log("鍒濆鍖栨椂鐨勫湴鍧�涓�: " + this.videoUrl)
-            this.play(this.videoUrl)
+         if (typeof (this.videoUrl) == "undefined") {
+           this.videoUrl = paramUrl;
+         }
+         console.log("鍒濆鍖栨椂鐨勫湴鍧�涓�: " + this.videoUrl)
+         this.play(this.videoUrl)
         })
     },
     watch:{
@@ -60,7 +64,7 @@
                         this.webrtcPlayer.close();
                         this.play(url)
                     }, 100)
-                    
+
                 }
             });
 
@@ -69,14 +73,14 @@
                 // document.getElementById('selfVideo').srcObject=s;
                 this.eventcallbacK("LOCAL STREAM", "鑾峰彇鍒颁簡鏈湴娴�")
             });
-            
+
         },
         pause: function () {
             if (this.webrtcPlayer != null) {
                 this.webrtcPlayer.close();
                 this.webrtcPlayer = null;
             }
-            
+
         },
         eventcallbacK: function(type, message) {
             console.log("player 浜嬩欢鍥炶皟")
@@ -106,5 +110,5 @@
     /* .iconqingxiLOGO {
         display: none !important;
     } */
-    
-</style>
\ No newline at end of file
+
+</style>

--
Gitblit v1.8.0