视频静音播放
This commit is contained in:
parent
bf8483c6e9
commit
11d49fd2be
|
|
@ -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();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue