video标签设置了autoplay 然后用户点了全屏 ended时间调用exitFullScreen()退出全屏。按我的理解,视频已经播放完成,退出全屏后应该停止播放了才对。结果视频还是在播放状态。。
<video id="video{{index}}" src="{{item.src}}" objectFit="contain" bindended="videoEnded({{index}})" show-center-play-btn="{{false}}" controls autoplay bindfullscreenchange="fullscreenchange({{index}})">
fullscreenchange(index, e) {
this.movieCommentaryList[index].fullScreen = e.detail.fullScreen;
}
videoEnded(index) {
let commentary = this.movieCommentaryList[index];
if (commentary.fullScreen) {
this.videoContext.exitFullScreen();
}
commentary.play = 2;
let max = this.movieCommentaryList.length - 1;
if (index >= max) return;
this.networkType == "wifi" && this.playVideo(index + 1);
this.$apply();
},
刚刚测试了一下 和autoplay无关。video ended后调用exitFullScreen 视频仍然会从头播放!