Hi all,
I'm trying to get started with plugin development, against a local development server.
I've copied the javascript example plugin hello world code to a local file (same directory as the jwplayer file). So then I'm attempting to load the plugin with the player like so:
<script type="text/javascript" src="assets/js/specialist/jwplayer.packed.js"></script>
<script type="text/javascript">
$(document).ready(function() {
jwplayer('player').setup({
flashplayer: 'assets/swf/player.swf',
file: 'FILE_URL_HERE',
image: 'STILL_URL_HERE',
width: 400,
height: 250,
stretching: 'fill',
plugins: { 'assets/js/specialist/jwplayer.helloworld.js': { text: 'It works...' } }
});
});
</script>And the plugin is:
(function(jwplayer){
var template = function(player, config, div) {
function setup(evt) {
// div.style.color = 'white';
// console.log(config.text);
console.log('Setup of plugin');
}
player.onReady(setup);
this.resize = function(width, height) {};
};
jwplayer().registerPlugin('hello', template);
})(jwplayer);
However, when the page is loaded I can see from chromes console that this message is output.
A plugin (helloworld) was registered with the player that was not loaded. Please check your configuration.
I've probably been over this so many times now that I can't see what would be wrong with my configuration for this not to work. For the record I'm using a licensed 5.7 version of the jwplayer.
Thanks,
Jim
The plugin registration line is actually:
jwplayer().registerPlugin('helloworld', template);Not what was previously written, I've been trying many variations is all.