浏览代码

Signed-off-by: zhaobao <528046418@qq.com>

zhaobao 1 年之前
父节点
当前提交
f4bfe392f6
共有 2 个文件被更改,包括 16 次插入8 次删除
  1. 5 1
      admin/.vscode/extensions.json
  2. 11 7
      admin/src/components/cameras/index.vue

+ 5 - 1
admin/.vscode/extensions.json

@@ -1,3 +1,7 @@
 {
-  "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
+  "recommendations": [
+    "vue.volar",
+    "vue.vscode-typescript-vue-plugin",
+    "ms-ceintl.vscode-language-pack-zh-hans"
+  ]
 }

+ 11 - 7
admin/src/components/cameras/index.vue

@@ -56,10 +56,10 @@
 
             },
             showModel(item){
-                // var destroyPromise = item.player.destroy();
-                // destroyPromise.then((data) => {
-                //     console.log("promise 获取 数据", data)
-                // })  
+                var destroyPromise = item.player.destroy();
+                destroyPromise.then((data) => {
+                    console.log("销毁-promise 获取 数据", data)
+                })  
                 event.stopPropagation()
                 let device={
                     ...item,
@@ -72,7 +72,10 @@
                 this.render(device)
             },
             close(){
-                this.device={}
+                this.device.player.destroy()
+                this.device.player.stop()
+                this.device={}   
+                document.getElementById('camera-deviceSerial').innerHTML=""         
             },
             getData(){
                 let items=cameras
@@ -87,12 +90,13 @@
                 let accessToken=this.accessToken;
                 item.player =  new EZUIKit.EZUIKitPlayer({
                     id: item.id||`video-${item.deviceSerial}`,
-                    autoplay: true,
+                    autoplay: false,
                     url: `ezopen://open.ys7.com/${item.deviceSerial}/1.hd.live`,
                     accessToken: accessToken,
                     plugin: ['talk'],  
                     width: item.width||400,
                     height: item.height||300,
+                    audio:0,
                     themeData:{
                         "autoFocus": 5,
                         "poster":item.deviceCover||"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",
@@ -117,7 +121,7 @@
                                 {
                                     "iconId": "sound",
                                     "part": "left",
-                                    "defaultActive": 1,
+                                    "defaultActive": 0,
                                     "memo": "声音按钮",
                                     "isrender": 1
                                 },