hulinfei 3 anni fa
parent
commit
fa7dbca230
1 ha cambiato i file con 7 aggiunte e 1 eliminazioni
  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) {