收藏
回答

video设置autoplay 结束后调用exitFullScreen的bug

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();

},


最后一次编辑于  2018-05-25  (未经腾讯允许,不得转载)
邀请回答
复制链接收藏投诉关注问题回答

1 个回答

  • lost
    lost
    2018-05-25

    刚刚测试了一下 和autoplay无关。video ended后调用exitFullScreen 视频仍然会从头播放!

    2018-05-25
    赞同
    回复