Hi,I'm looking to bind a completion event when a video finishes playing that will reveal the original poster image. I'm wondering whether I can expand the existing component to do this via our theme.
My knowledge of Backbone isn't massive but having thoroughly Google'd and searched through the docs I'm stumped on how I'd do this and would ideally like to avoid creating a new component to complete this simple change.
So far I have the below as a script included into the theme.js
define(function(require) {
// var Adapt = require('coreJS/adapt');
var Media = require('components/adapt-contrib-media/js/adapt-contrib-media');
Media = Media.extend({
initialize: function(){
var modelOptions = this.model.get('_playerOptions');
modelOptions.success = _.bind(this.createPosterEvent, this);
},
createPosterEvent: function(){
//Poster will appear
}
});
return Media;
});
Appreciate any help that can be offered.
Thanks guys.