Jelajahi Sumber

fix(back): video cannot be played

Casper Dai 3 tahun lalu
induk
melakukan
1349b86a15
1 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 3 1
      src/views/device/back/components/Video.vue

+ 3 - 1
src/views/device/back/components/Video.vue

@@ -126,7 +126,9 @@ export default {
       }
     },
     getAuthCode () {
-      authCode({ deviceId: this.device.id }).then(this.createPlayer)
+      authCode({ deviceId: this.device.id }).then(({ data }) => {
+        this.createPlayer(data)
+      })
     },
     createPlayer ({ timestamp, token, expire }) {
       if (flvjs.isSupported()) {