I am trying to use backbone to listen for when a video has ended but I am getting undefined is not a function returned.
Trying to call another method from within a backbone view once video has ended:
playIOS: function() {
var $video = $('video'),
video = $video.get(0);
video.play();
this.listenTo( video, 'ended', this.videoEnded );
},
videoEnded: function() {
alert( 'Video Ended!' );
}
Clearly my method is not working. Is there a recommended solution for monitoring media playback events with Backbone?
Aucun commentaire:
Enregistrer un commentaire