How to do it? I searched Stack Overflow, find one similar result, but it doesn\'t work.
Here\'s my code:
var Player = Backbone.Model.extend({
defaults:
All Backbone.View
event handlers are delegated to the view's el
. This means that any events that fire inside the view must bubble/propagate up to its el
before your handlers will catch them.
Unfortunately for you, HTML5 audio and video elements do not propagate their events up through the DOM the way most other elements do. The only way to handle these events is to add eventListeners directly to the <audio>
element after it has been inserted into the DOM.