1.html 中
<video ref="videoPlayer" id="videoPlayer" class="video-box" autoplay controls loop muted > </video>
2.js中
this.$refs.videoPlayer.src = ‘xxxxx’; this.$refs.videoPlayer.play(); this.$refs.videoPlayer.muted = false;
3.设置浏览器默认打开声音
1.html 中
<video ref="videoPlayer" id="videoPlayer" class="video-box" autoplay controls loop muted > </video>
2.js中
this.$refs.videoPlayer.src = ‘xxxxx’; this.$refs.videoPlayer.play(); this.$refs.videoPlayer.muted = false;
3.设置浏览器默认打开声音