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) {