Created
September 22, 2013 09:58
-
-
Save ranyefet/6658533 to your computer and use it in GitHub Desktop.
Sample Kaltura Component
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
( function( mw, $ ) {"use strict"; | |
// 'myPlugin' should be defined in jsonConfig in order to be loaded/enabled | |
mw.PluginManager.add( 'myPlugin', mw.KBaseComponent.extend({ | |
// Default component config | |
defaultConfig: { | |
parent: "controlsContainer", | |
order: 70, | |
align: "right" | |
}, | |
setup: function(){ | |
// Plugin setup logic | |
}, | |
getComponent: function(){ | |
if( !this.$el ) { | |
this.$el = $('<span />').text('My Plugin'); | |
} | |
return this.$el; | |
} | |
})); | |
} )( window.mw, window.jQuery ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment