Explorar el Código

fix(camera): bugs

hulinfei hace 3 años
padre
commit
fa7dbca230
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  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) {