瀏覽代碼

fix(camera): bugs

hulinfei 3 年之前
父節點
當前提交
fa7dbca230
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/views/external/camera/index.vue

+ 7 - 1
src/views/external/camera/index.vue

@@ -439,11 +439,17 @@ export default {
     }
   },
   created () {
-    this.getCamera(this.cameraType)
+    this.bind && this.getCamera(this.cameraType)
   },
   beforeDestroy () {
     this.destroyPlayer()
   },
+  activated () {
+    this.getCamera(this.cameraType)
+  },
+  deactivated () {
+    this.destroyPlayer()
+  },
   methods: {
     destroyPlayer () {
       for (const key in this.playerList) {