Created
May 4, 2015 09:58
-
-
Save ranyefet/4eb5a8ed550cc26d89f2 to your computer and use it in GitHub Desktop.
Kaltura Plugin Skeleton
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.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