From d09d8f11f06ee6eeeb4c7f9bd6d35e6fbd49e05f Mon Sep 17 00:00:00 2001
From: jiang <893224616@qq.com>
Date: 星期四, 04 八月 2022 17:01:31 +0800
Subject: [PATCH] 修改‘修改pushkey’窗口的标题提示文案

---
 web_src/src/components/dialog/easyPlayer.vue |   44 +++++++++++++++++++++++++++-----------------
 1 files changed, 27 insertions(+), 17 deletions(-)

diff --git a/web_src/src/components/dialog/easyPlayer.vue b/web_src/src/components/dialog/easyPlayer.vue
index f6a7b47..daf7207 100644
--- a/web_src/src/components/dialog/easyPlayer.vue
+++ b/web_src/src/components/dialog/easyPlayer.vue
@@ -1,7 +1,5 @@
 <template>
-    <div id="player">
-        <div id="easyplayer"></div>
-    </div>
+  <div id="easyplayer"></div>
 </template>
 
 <script>
@@ -12,35 +10,47 @@
             easyPlayer: null
         };
     },
-    props: ['videoUrl', 'error', 'hasaudio'],
+    props: ['videoUrl', 'error', 'hasaudio', 'height'],
     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.play(this.videoUrl)
         })
     },
     watch:{
         videoUrl(newData, oldData){
-            this.easyPlayer.destroy()
-            this.easyPlayer = new WasmPlayer(null, 'easyplayer', this.eventcallbacK)
-            this.easyPlayer.play(newData, 1)
+            this.play(newData)
         },
         immediate:true
     },
     methods: {
         play: function (url) {
-            this.easyPlayer = new WasmPlayer(null, 'easyplayer', this.eventcallbacK)
+          console.log(this.height)
+            if (this.easyPlayer != null) {
+              this.easyPlayer.destroy();
+            }
+            if (typeof (this.height) == "undefined") {
+              this.height = false
+            }
+            this.easyPlayer = new WasmPlayer(null, 'easyplayer', this.eventcallbacK, {Height: this.height})
             this.easyPlayer.play(url, 1)
         },
         pause: function () {
-            this.easyPlayer.destroy();
+          this.easyPlayer.destroy();
+          this.easyPlayer = null
         },
         eventcallbacK: function(type, message) {
-            console.log("player 浜嬩欢鍥炶皟")
-            console.log(type)
-            console.log(message)
+            // console.log("player 浜嬩欢鍥炶皟")
+            // console.log(type)
+            // console.log(message)
         }
+    },
+    destroyed() {
+      this.easyPlayer.destroy();
     },
 }
 </script>
@@ -50,8 +60,8 @@
         min-width: 70px;
     }
     /* 闅愯棌logo */
-    /* .iconqingxiLOGO {
+    .iconqingxiLOGO {
         display: none !important;
-    } */
+    }
 
 </style>

--
Gitblit v1.8.0