<FWRenderer > Protocol Reference

Protocol for FWRenderer. More...

#import <FWProtocols.h>

+ Inheritance diagram for <FWRenderer >:

Instance Methods

(id) - initWithRendererController:
 Initialize the renderer with a renderer controller. More...
 
(void) - start
 Start ad playback. More...
 
(void) - stop
 Stop ad playback. More...
 
(NSDictionary *) - moduleInfo
 Get module info. More...
 
(NSTimeInterval) - duration
 Get duration of the ad. More...
 
(NSTimeInterval) - playheadTime
 Get playheadTime of the ad. More...
 
(void) - preload
 Preload the ad. More...
 
(void) - pause
 User intended pause. More...
 
(void) - resume
 User intended resume. More...
 

Detailed Description

Protocol for FWRenderer.

Method Documentation

- (NSTimeInterval FWRenderer) duration

Get duration of the ad.

Returns
a positive number in seconds as NSTimeInterval, or -1 if the duration is N/A
- (id FWRenderer) initWithRendererController: (id< FWRendererController >)  rendererController

Initialize the renderer with a renderer controller.

Parameters
rendererControllerreference to id<FWRendererController>

Note: Typically the renderer declares all available capabilities and events when this method is called.

- (NSDictionary * FWRenderer) moduleInfo

Get module info.

The returned dictionary should contain key FW_INFO_KEY_MODULE_TYPE with FW_MODULE_TYPE_* value, and should contain key FW_INFO_KEY_REQUIRED_API_VERSION with the FreeWheel RDK version when the component is compiled.

- (void FWRenderer) pause
optional

User intended pause.

Should pause ad playback and send IAB _pause callback by calling [rendererController processEvent:FW_EVENT_AD_PAUSE info:nil].

- (NSTimeInterval FWRenderer) playheadTime

Get playheadTime of the ad.

Returns
a positive number in seconds as NSTimeInterval, or -1 if the playhead time is N/A
- (void FWRenderer) preload
optional

Preload the ad.

Note: Renderers should start preloading the ad asynchronously when this method is called, and transit to FW_RENDERER_STATE_PRELOADED state when the ad finishes preloading.

Translators should translate and schedule ads in the preloading stage.

- (void FWRenderer) resume
optional

User intended resume.

Should resume ad playback and send IAB _resume callback by calling [rendererController processEvent:FW_EVENT_AD_RESUME info:nil]

- (void FWRenderer) start

Start ad playback.

Note: The renderer should start the ad playback when this method is called, and transit to FW_RENDERER_STATE_STARTED state as soon as the ad has started.

When the ad stops (either interrupted or reached the end), the renderer should transit to FW_RENDERER_STATE_COMPLETED state.

- (void FWRenderer) stop

Stop ad playback.

Note: Typically the renderer will dispose playing images/videos from screen when receive this notification, and transit to FW_RENDERER_STATE_COMPLETED state as soon as the ad is stopped.


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