H5视频全屏播放
<div class="video-box">
<video
x5-video-player-type="h5"
x5-video-player-fullscreen="true"
webkit-playsinline
playsinline
controls
preload
:src="视频地址"
ref="video"
class="video"
style="object-fit: fill"
x-webkit-airplay="true"
poster="预览图地址"
></video>
<div class="cover"></div>
</div>
.video-box {
width: 100vw;
height: 100vh;
overflow: hidden;
position: fixed;
top: 0;
left: 0;
background: #fff;
.cover {
width: 100vw;
height: 100vh;
position: absolute;
top: 0;
left: 0;
z-index: 999;
}
.video {
width: 100%;
}
}
videoPlay() {
this.$refs.video.play();
},