Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Errors in Documentation for Plugins API

4 replies [Last post]

I'm looking at http://developer.longtailvideo.com/trac/wiki/Player5PluginsBuilding. It mentions PluginInterface. I don't think that's right. I think it should be IPlugin.

Also, in the plugin SDK, there's a Player5Plugin.as. I'm trying to compile plugins into the player, which used to be a bit easier in JW Player 4.7. However, I did manage to get it to work. However, the plugin wouldn't actually show up until I added the following to initPlugin:

config['width'] = player.controls.display.width;
config['height'] = player.controls.display.height;
config['visible'] = true;

I don't know if that would still be the case if I weren't compiling plugins into the player.

Also on http://developer.longtailvideo.com/trac/wiki/Player5PluginsBuilding, the resize function must have type :void or else the Flex SDK barfs.

@Shannon

You're absolutely right about the wiki errors. I've fixed them.

As for compiling the plugins in, how are you doing that? I believe there's a way to do it without those modifications to the config block.

I hacked PlayerSetup.as so that it loads some internal plugins in addition to loading remote ones. This was trivial in 4.6, but it takes more work in 5.1 since what used to be builtin plugins are now components. I have a diff if you want it.

It does seem interesting that the following code is only used for V4 plugins in PlayerSetup.as:

pluginConf['width'] = _player.controls.display.width;
pluginConf['height'] = _player.controls.display.height;
pluginConf['visible'] = true;

By the way, since I'm compiling the plugin into the player, I don't have any XML files to refer to for configuration. That might be why it doesn't work.

> That might be why it doesn't work.

What I mean is it doesn't work *unless* I add the following to initPlugin in the plugin:

config['width'] = player.controls.display.width;
config['height'] = player.controls.display.height;
config['visible'] = true;

I did get it to work once I figured out that workaround. I wonder if PlayerSetup.as should do that stuff.