拖动进度条在bindtimeupdate回调中使用video暂停事件不能暂停视频?

发布于 6 年前作者 xiulanwen5291 次浏览最后编辑 6 年前来自 issues

<video id=“video” bindtimeupdate=“timeUpdate”/>

this.videoContext = wx.createVideoContext(‘video’);

timeUpdate (e) {

if (e.detail.currentTime &gt; 3) {

this.videoContext.pause()

}

上述代码中,在不拖动进度条的情况下能够正常执行视频暂停, 但在拖动进度条之后时间到三秒之后就会发现视频没有被暂停,且无法用任何事件阻止

2 回复
gren
gren1 楼6 年前
chuang
chuang2 楼4 年前

this,videoContext.pause() this后面是个逗号啊,没报错吗?可否提供示例代码片段,我测试一下