Packagecom.brightcove.api
Classpublic class CustomModule
InheritanceCustomModule Inheritance flash.display.Sprite

The class is an abstract base class that can be extended when developing custom Module or SWFLoader SWFs. It handles checking whether the API has been enabled for the player instance, and whether the player is ready for interaction on load of the SWF. Once the player is ready for API interaction, the abstract initialize() method is invoked. It is this method that should be overridden by concrete child classes at which point API interaction can be written using the player property to access the player interface through the BrightcoveModuleWrapper instance stored in that property. See the following articles for code examples: Basic examples using Brightcove Wrapper and Brightcove Custom Module, the Using CustomModule section in the article, Creating Custom Player Components, and Displaying the Number of Video Viewsin your Player for a code example that extends CustomModule.



Public Properties
 PropertyDefined By
  player : BrightcoveModuleWrapper
[read-only] Returns a reference to the BrightcoveModuleWrapper class that wraps the player API interface.
CustomModule
Public Methods
 MethodDefined By
  
setInterface(player:IEventDispatcher):void
The method called by the Brightcove player to establish a link between the player and the custom module.
CustomModule
Protected Methods
 MethodDefined By
  
initialize():void
This method is called once the player is ready for interaction.
CustomModule
Property Detail
playerproperty
player:BrightcoveModuleWrapper  [read-only]

Returns a reference to the BrightcoveModuleWrapper class that wraps the player API interface.


Implementation
    public function get player():BrightcoveModuleWrapper
Method Detail
initialize()method
protected function initialize():void

This method is called once the player is ready for interaction. You must override this method in the child class.

setInterface()method 
public function setInterface(player:IEventDispatcher):void

The method called by the Brightcove player to establish a link between the player and the custom module. There should be no need to manually call or to override this method. See the article, Creating Custom Player Controls for a code example of this method.

Parameters

player:IEventDispatcher — player interface through which all of the Brightcove player API is accessed.