You can write a flash plugin using the Flex SDK. I wrote a base class that inherits from Sprite to handle this.
import flash.display.Sprite; import flash.display.DisplayObject; import com.longtailvideo.jwplayer.player.IPlayer; import com.longtailvideo.jwplayer.view.components.ComponentButton; import com.longtailvideo.jwplayer.view.interfaces.IControlbarComponent; public class ExtendedPlugin extends Sprite { protected var _player:IPlayer; public function ExtendedPlugin() { } public function hideControlbarButton(buttonName:String):void { var controlbar:IControlbarComponent = _player.controls.controlbar; var button:DisplayObject = controlbar.getButton(buttonName); button.height = 0; button.width = 0; } }
Then you can write your plugin, inheriting it from this class.
public class MyPlugin extends ExtendedPlugin implements IPlugin { public function initPlugin(player:IPlayer, config:PluginConfig):void { _player = player; } }
If you want to hide the play and pause buttons, for example, you will do the following:
hideControlbarButton("play"); hideControlbarButton("pause");
For this, you will need the right libraries. Then you will also need to reference SWF in the jwplayer options.
Danny g
source share