Skip to content

Instantly share code, notes, and snippets.

@ranyefet
Created September 22, 2013 09:58
Show Gist options
  • Save ranyefet/6658533 to your computer and use it in GitHub Desktop.
Save ranyefet/6658533 to your computer and use it in GitHub Desktop.
Sample Kaltura Component
( 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