From e48fa711a3664bece9b3e58840a75fe7c05bc47c Mon Sep 17 00:00:00 2001
From: panlinlin <648540858@qq.com>
Date: 星期六, 08 五月 2021 17:14:05 +0800
Subject: [PATCH] 添加截图(快照)功能

---
 web_src/src/components/dialog/easyPlayer.vue |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/web_src/src/components/dialog/easyPlayer.vue b/web_src/src/components/dialog/easyPlayer.vue
index f6a7b47..c79f65d 100644
--- a/web_src/src/components/dialog/easyPlayer.vue
+++ b/web_src/src/components/dialog/easyPlayer.vue
@@ -14,10 +14,14 @@
     },
     props: ['videoUrl', 'error', 'hasaudio'],
     mounted () {
+      let paramUrl = decodeURIComponent(this.$route.params.url)
        this.$nextTick(() =>{
-           console.log("鍒濆鍖栨椂鐨勫湴鍧�涓�: " + this.videoUrl)
-            this.easyPlayer = new WasmPlayer(null, 'easyplayer', this.eventcallbacK)
-            this.easyPlayer.play(this.videoUrl, 1)
+          if (typeof (this.videoUrl) == "undefined") {
+            this.videoUrl = paramUrl;
+          }
+          console.log("鍒濆鍖栨椂鐨勫湴鍧�涓�: " + this.videoUrl)
+          this.easyPlayer = new WasmPlayer(null, 'easyplayer', this.eventcallbacK)
+          this.easyPlayer.play(this.videoUrl, 1)
         })
     },
     watch:{
@@ -42,6 +46,9 @@
             console.log(message)
         }
     },
+    destroyed() {
+      this.easyPlayer.destroy();
+    },
 }
 </script>
 

--
Gitblit v1.8.0