Created
December 11, 2013 16:21
-
-
Save ranyefet/7913503 to your computer and use it in GitHub Desktop.
How to extend the core scrubber.js plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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