zhangzengfei
2022-03-23 e01873ebcc69acc322c1432a10ed18c570441841
src/components/wasmPlayer/index.vue
@@ -175,6 +175,17 @@
          this.playVideo()
        })
      }
    },
    videoUrl: function(newVal, oldVal) {
      if (newVal !== oldVal) {
        if (this.player) {
          this.player.stop()
        }
        this.$nextTick(() => {
          this.player.preloadFlag = 0
          this.playVideo()
        })
      }
    }
  },
  mounted() {
@@ -406,7 +417,8 @@
    },
    setPlayerStatus(stat) {
      this.videoLoading = false
      this.playerStatus = 1
      // 控制加载后的播放按钮状态,实时流为自动播放,视频为preload
      this.playerStatus = this.isStream ? 1 : 0
    },
    stopVideo() {
      if (this.player.hPlayer == 0) return