[英]Prevent user from seeking in HTML5 Video
I'm trying to prevent a user from seeking but can't seem to get it to work. 我试图阻止用户搜索,但似乎无法使其正常工作。 Here's how I bind to the event.
这是我绑定事件的方式。 Any ideas how I can prevent it from happening?
有什么想法可以防止它发生吗?
@$('#video').bind("seeking", (e) =>
e.preventDefault()
e.stopPropagation()
)
you can do what I did, hide the video element, keep a canvas in it's place, and keep some custom play/pause, mute/unmute button on it as overlay, and you can keep drawing the canvas using requestAnimationFrame
or setTimeout
您可以执行我的操作,隐藏视频元素,在其位置保留画布,并在其上保留一些自定义播放/暂停,静音/取消静音按钮作为覆盖,并且可以继续使用
requestAnimationFrame
或setTimeout
绘制画布
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.