视频静音播放

This commit is contained in:
ljx 2025-06-04 10:26:00 +08:00
parent bf8483c6e9
commit 11d49fd2be
1 changed files with 5 additions and 1 deletions

View File

@ -94,7 +94,7 @@
</div> </div>
<div class="jc-video" style="margin-top:50px;"> <div class="jc-video" style="margin-top:50px;">
<!-- 添加播放器 --> <!-- 添加播放器 -->
<video src="/bi5.mp4" controls loop autoplay></video> <video id="myVideo" src="/bi5.mp4" controls loop autoplay></video>
</div> </div>
</dv-border-box-1> </dv-border-box-1>
</div> </div>
@ -271,6 +271,10 @@ export default {
this.todayDate = `${month}${day}`; this.todayDate = `${month}${day}`;
this.todayWeek = week; this.todayWeek = week;
const video = document.getElementById('myVideo');
video.muted = true; //
video.autoplay = true;
video.play().catch(e => console.error('播放错误:', e));
this.initPieChart(); this.initPieChart();
this.initDangerChart(); this.initDangerChart();
this.initSafeChart(); this.initSafeChart();