<OOAdPlugin> Protocol Reference

An interface to implement an Ad Plugin, which can plug into the OoyalaPlayer. More...

#import <OOAdPlugin.h>

+ Inheritance diagram for <OOAdPlugin>:

Instance Methods

(BOOL) - onContentChanged
 This is called when content changed. More...
 
(BOOL) - onInitialPlay
 This is called before start playing content so plugin can play preroll. More...
 
(BOOL) - onPlayheadUpdate:
 This is called when playhead is updated so plugin can play midroll. More...
 
(BOOL) - onContentFinished
 This is called before finishing playing content so plugin can play postroll. More...
 
(BOOL) - onCuePoint:
 This is called when a cue point is reached so plugin can play midroll. More...
 
(BOOL) - onContentError:
 This is called when an error occured when playing back content. More...
 
(void) - onAdModeEntered
 This is called when control is handed over to the plugin. More...
 
(id< OOPlayerProtocol >) - player
 This is called ooyala UI pass down UI related events. More...
 
(void) - resetAds
 This is called to reset all ads to unplayed. More...
 
(void) - skipAd
 This is called to skip the current ad. More...
 
(void) - clickAd
 This is called when the ad is clicked. More...
 
(NSSet *) - getCuePointsAtSeconds
 
(void) - onAdIconClicked:
 Called when an icon is clicked. More...
 
(BOOL) - hasNotNilAds
 Called to check if we're not dealing with nil ads. More...
 
- Instance Methods inherited from <OOLifeCycle>
(void) - reset
 This is called when plugin should be reset. More...
 
(void) - suspend
 This is called when plugin should be suspended. More...
 
(void) - resume
 This is called when plugin should be resumed. More...
 
(void) - resume:stateToResume:
 This is called when plugin should be resumed. More...
 
(void) - destroy
 This is called when plugin should be destryed. More...
 

Detailed Description

An interface to implement an Ad Plugin, which can plug into the OoyalaPlayer.

See also
OOOoyalaPlayer.registerAdPlayer:forType:

Method Documentation

- (void) clickAd

This is called when the ad is clicked.

- (NSSet *) getCuePointsAtSeconds
Returns
non-nil (possibly empty) array of cue point times for ads.NSNumber int seconds>
- (BOOL) hasNotNilAds

Called to check if we're not dealing with nil ads.

Returns
YES if ads are present
- (void) onAdIconClicked: (NSInteger)  index

Called when an icon is clicked.

Parameters
indexthe index of the icon
- (void) onAdModeEntered

This is called when control is handed over to the plugin.

- (BOOL) onContentChanged

This is called when content changed.

Returns
true if plugin want to enter admode, false otherwise
- (BOOL) onContentError: (int)  errorCode

This is called when an error occured when playing back content.

Returns
true if plugin want to enter admode, false otherwise
- (BOOL) onContentFinished

This is called before finishing playing content so plugin can play postroll.

Returns
true if plugin want to enter admode, false otherwise
- (BOOL) onCuePoint: (int)  cuePointIndex

This is called when a cue point is reached so plugin can play midroll.

Returns
true if plugin want to enter admode, false otherwise
- (BOOL) onInitialPlay

This is called before start playing content so plugin can play preroll.

Returns
true if plugin want to enter admode, false otherwise
- (BOOL) onPlayheadUpdate: (Float64)  playhead

This is called when playhead is updated so plugin can play midroll.

Returns
true if plugin want to enter admode, false otherwise
- (id<OOPlayerProtocol>) player

This is called ooyala UI pass down UI related events.

Returns
an object that implements PlayerInterface if plugin needs to process ui events, null if these events should be ignored.
- (void) resetAds

This is called to reset all ads to unplayed.

- (void) skipAd

This is called to skip the current ad.


The documentation for this protocol was generated from the following file: