Commit 40c0f52e9586b1575b25c6e96e5dc872db6a1d33

Authored by fengwotao
1 parent 814c00cf

perf(external/Composes): 修复摄像头页面刷新不自动播放问题

1 1 <template>
2 2 <div class="go-content-box" :style="{ width: w + 'px', height: h + 'px' }">
3   - <video id="my-player" ref="videoRef" class="video-js my-video vjs-theme-city vjs-big-play-centered">
  3 + <video id="my-player" ref="videoRef" class="video-js my-video vjs-theme-city vjs-big-play-centered">
4 4 <source :src="dataset" />
5 5 </video>
6 6 </div>
... ... @@ -37,6 +37,7 @@ const options: VideoJsPlayerOptions = {
37 37 autoplay: true, // 是否自动播放
38 38 fluid: false, // 自适应宽高
39 39 src: dataset?.value, // 要嵌入的视频源的源 URL
  40 + muted:true,
40 41 userActions: {
41 42 hotkeys: true
42 43 }
... ... @@ -64,6 +65,9 @@ watch(
64 65 props.chartConfig.option.dataset = newData
65 66 videoPlayer?.src(newData)
66 67 videoPlayer?.play()
  68 + },
  69 + {
  70 + immediate: true
67 71 }
68 72 )
69 73 </script>
... ...