Jelajahi Sumber

fix(camera): bugs

hulinfei 3 tahun lalu
induk
melakukan
fa7dbca230
1 mengubah file dengan 7 tambahan dan 1 penghapusan
  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) {