Skip to content

Instantly share code, notes, and snippets.

@ranyefet
Created December 11, 2013 16:21
Show Gist options
  • Save ranyefet/7913503 to your computer and use it in GitHub Desktop.
Save ranyefet/7913503 to your computer and use it in GitHub Desktop.
How to extend the core scrubber.js plugin
mw.kalturaPluginWrapper(function(){
// I'm using PluginManager to get the class of the core scrubber plugin in order to extend it
mw.PluginManager.add( 'myScrubber', mw.PluginManager.getClass('scrubber').extend({
// I'm overriding only the updatePlayheadUI method
updatePlayheadUI: function(val) {
// Optionally calling the original method
// this._super(val);
// Adding my own functionality
console.log('New playhead position', val);
}
}));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment