Package | com.brightcove.fl.advertising.adSwf |
Class | public class AdSwf |
Inheritance | AdSwf ![]() |
See also
Property | Defined By | ||
---|---|---|---|
config : AdSwfConfig [read-only]
Configuration of the ad SWF. | AdSwf | ||
currentAdProperties : Object [read-only]
Override this function to provide a response for the player API call
getCurrentAdProperties() on the AdvertisingModule. | AdSwf | ||
mediaDuration : Number [read-only]
When config.pauseVideoPlayer is true, override this function to tell the player the
duration of an ad in seconds. | AdSwf | ||
mediaPosition : Number [read-only]
When config.pauseVideoPlayer is true, override this function to tell the player the
current position of an ad in seconds. | AdSwf |
Method | Defined By | ||
---|---|---|---|
adComplete():void
Tells the player that the ad is done. | AdSwf | ||
adPause():void
Tells the player that the ad has been paused. | AdSwf | ||
adResume():void
Tells the player that the ad is resuming after being paused. | AdSwf | ||
configureAd(pAdContext:AdSwfContext):void
Provides a way to set up the AdConfig parameters before displayAd() is called. | AdSwf | ||
configureAdComplete():void
Tells the player that configureAd() is done. | AdSwf | ||
dispatchAdEvent(event:Event):void
Dispatches the given event to the advertising module in the player API. | AdSwf | ||
displayAd(pAdContext:AdSwfContext):void
Called when a new ad should be displayed. | AdSwf |
Event | Summary | Defined By | ||
---|---|---|---|---|
When config.pauseVideoPlayer is true, this event is dispatched when there's a request for media playback to pause. | AdSwf | |||
When config.pauseVideoPlayer is true, this event is dispatched when there's a request for media playback to resume. | AdSwf | |||
When config.pauseVideoPlayer is true, this event is dispatched when there's a request for media playback to change volume. | AdSwf |
config | property |
config:AdSwfConfig
[read-only] Configuration of the ad SWF. These values should be set at the beginning of displayAd()
public function get config():AdSwfConfig
See also
currentAdProperties | property |
currentAdProperties:Object
[read-only] Override this function to provide a response for the player API call getCurrentAdProperties() on the AdvertisingModule.
public function get currentAdProperties():Object
mediaDuration | property |
mediaDuration:Number
[read-only] When config.pauseVideoPlayer is true, override this function to tell the player the duration of an ad in seconds. This is only relevant when pauseVideoPlayer is true. It is used to provide information to the player's video API. See getVideoDuration() in the VideoPlayerModule in the player API documentation. The default value for mediaDuration is 0 seconds.
public function get mediaDuration():Number
mediaPosition | property |
mediaPosition:Number
[read-only] When config.pauseVideoPlayer is true, override this function to tell the player the current position of an ad in seconds. It is used to provide information to the player's video API and to change the time remaining for the ad. See getVideoPosition() in the VideoPlayerModule in the player API documentation. The default value for mediaPosition is 0 seconds.
public function get mediaPosition():Number
adComplete | () | method |
public function adComplete():void
Tells the player that the ad is done. This must be called when an ad is done playing. This dispatches the AD_COMPLETE event in the player API and allows more ads to play.
adPause | () | method |
public function adPause():void
Tells the player that the ad has been paused. This is usually only used when config.pauseVideoPlayer is true. This dispatches the AD_PAUSE event in the player API.
adResume | () | method |
public function adResume():void
Tells the player that the ad is resuming after being paused. This is usually only used when config.pauseVideoPlayer is true. This dispatches the AD_PAUSE event in the player API.
configureAd | () | method |
public function configureAd(pAdContext:AdSwfContext):void
Provides a way to set up the AdConfig parameters before displayAd() is called. Override this function if you need to set up AdSwfConfig for each ad request. configureAdComplete() must be called if this function is overriden.
Parameters
pAdContext:AdSwfContext |
See also
configureAdComplete | () | method |
public function configureAdComplete():void
Tells the player that configureAd() is done. This function only needs to be called if configureAd() is overriden.
dispatchAdEvent | () | method |
public function dispatchAdEvent(event:Event):void
Dispatches the given event to the advertising module in the player API. This can be one of the built-in ad events found in AdEvent or a completely custom event. If you would like to dispatch one of the built-in ad events, you must use the AdEvent class found in the player SWC. This is most commonly used with AdSwfConfig.customStartStopEvents to allow for multiple ad start and stop events.
Parameters
event:Event |
displayAd | () | method |
public function displayAd(pAdContext:AdSwfContext):void
Called when a new ad should be displayed. This function must be overriden by ad SWF implementations in order to display a SWF. External resources can be accessed or anything else that needs to be done in order to display the ad. adComplete() must be called when the ad is done.
Parameters
pAdContext:AdSwfContext — The current context of the player to be used for the ad request.
|
See also
pause | Event |
com.brightcove.fl.advertising.adSwf.AdSwfMediaEvent
com.brightcove.fl.advertising.adSwf.AdSwfMediaEvent.PAUSE
When config.pauseVideoPlayer is true, this event is dispatched when there's a request for media playback to pause. This can occur from a user click or a call in the player API to videoModule.pause(true).
Dispatched when there's a request for media playback to pause. This can occur from a user click or a call in the player API to videoModule.pause(true).resume | Event |
com.brightcove.fl.advertising.adSwf.AdSwfMediaEvent
com.brightcove.fl.advertising.adSwf.AdSwfMediaEvent.PLAY
When config.pauseVideoPlayer is true, this event is dispatched when there's a request for media playback to resume. This can occur from a user click or a call in the player API to videoModule.pause(false).
volumeChange | Event |
com.brightcove.fl.advertising.adSwf.AdSwfMediaEvent
com.brightcove.fl.advertising.adSwf.AdSwfMediaEvent.VOLUME_CHANGE
When config.pauseVideoPlayer is true, this event is dispatched when there's a request for media playback to change volume. This can occur from a user click, a call in the player API to videoModule.setVolume(), or a call to videoModule.mute(). The new volume is set in volume. If the volume is muted, the volume will be 0.
Dispatched when there's a request for media playback to change volume. This can occur from a user click, a call in the player API to videoModule.setVolume(), or a call to videoModule.mute(). The new volume is set in volume. If the volume is muted, the volume will be 0.