拖动进度条在bindtimeupdate回调中使用video暂停事件不能暂停视频?
发布于 4 年前 作者 xiulanwen 5027 次浏览 来自 官方Issues

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

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

timeUpdate (e) {

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

this.videoContext.pause()

}

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

2 回复

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

回到顶部