Skip to content

Instantly share code, notes, and snippets.

@ranyefet
Created May 4, 2015 09:58
Show Gist options
  • Save ranyefet/4eb5a8ed550cc26d89f2 to your computer and use it in GitHub Desktop.
Save ranyefet/4eb5a8ed550cc26d89f2 to your computer and use it in GitHub Desktop.
Kaltura Plugin Skeleton
mw.PluginManager.add( 'myPlugin', mw.KBasePlugin.extend({
defaultConfig: {
foo: "Bar",
isBar: false,
bazToShow: 5,
pauseTimeout: 10
},
// Will be called when plugin initialized
setup: function(){
// See mw.KBasePlugin.js for available methods
// Log something
this.log('plugin setup');
// Bind events using this.bind
this.bind('onplay', $.proxy(function(){
// Grab configuration using this.getConfig
setTimeout($.proxy(function(){
// Accessing the player API using this.getPlayer()
this.getPlayer().pause();
},this), this.getConfig('pauseTimeout'));
},this));
}
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment