本文介绍了什么是视频html5元素上的播放事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在页面上嵌入了视频html5标记。我需要在用户点击播放按钮时触发操作。但是我找不到如何将它绑定到我的动作上。是否有我需要的活动?我正在使用jQuery ...
I have a video html5 tag embedded on page. I need to trigger an action when the user clicks the "Play Button". But I can't find how to bind that to my action. Is there an event for what I need? I'm using jQuery...
谢谢!
推荐答案
这个W3C演示页面有帮助吗? 看来播放事件只是'播放'。
Does this W3C demo page help? http://www.w3.org/2010/05/video/mediaevents.html It appears the play event is simply 'play'.
例如:
$('video').bind('play', function (e) {
// do something
});
或
$('video').on('play', function (e) {
// do something
});
这篇关于什么是视频html5元素上的播放事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!