<FWRendererController > Protocol Reference

Protocol for renderer controller The FWRendererController class provides methods for reporting metric events and changing renderer states. More...

#import <FWProtocols.h>

+ Inheritance diagram for <FWRendererController >:

Instance Methods

(CLLocation *) - location
 Return the current location. More...
 
(UIViewController *) - currentViewController
 Return application's current view controller. More...
 
(MPMoviePlayerController *) - DEPRECATED_ATTRIBUTE
 
(BOOL) - DEPRECATED_ATTRIBUTE
 
(NSArray */*id< FWCreativeRendition > */) - renderableCreativeRenditions
 Return all renderable renditions for Renderer. More...
 
(void) - processEvent:info:
 Process renderer event. More...
 
(void) - setCapability::
 
(void) - setCapability:status:
 Declare a capability of the renderer. More...
 
(NSUInteger) - version
 Return the Major version of AdManager, e.g. More...
 
(id) - getParameter:
 Retrieve a parameter. More...
 
(id< FWAdInstance >) - adInstance
 Get rendering ad instance. More...
 
(void) - handleStateTransition:info:
 Transit renderer state. More...
 
(id< FWContext >) - notificationContext
 Returns the sender of all FreeWheel related notifications. More...
 
(NSArray */*id< FWAdInstance > */) - scheduleAdInstances:
 
(NSArray */*id< FWAdInstance > */) - scheduleAdInstancesInSlots:
 Schedule ad instances for the given slots. More...
 
(void) - requestTimelinePause
 Request timeline to pause. More...
 
(void) - requestTimelineResume
 Request timeline to resume. More...
 
(void) - requestContentStateChange:
 Deprecated. More...
 
(void) - log:
 Renderer should use this API to trace all logs. More...
 

Detailed Description

Protocol for renderer controller The FWRendererController class provides methods for reporting metric events and changing renderer states.

Method Documentation

- (id<FWAdInstance> FWRendererController) adInstance

Get rendering ad instance.

- (UIViewController * FWRendererController) currentViewController

Return application's current view controller.

See also: -[FWAdManager setCurrentViewController:].

Returns
current view controller
- (BOOL FWRendererController) DEPRECATED_ATTRIBUTE
- (MPMoviePlayerController * FWRendererController) DEPRECATED_ATTRIBUTE
- (id FWRendererController) getParameter: (NSString *)  name

Retrieve a parameter.

Parameters
nameParameter name
- (void FWRendererController) handleStateTransition: (FWRendererStateType)  state
info: (NSDictionary *)  details 

Transit renderer state.

Parameters
statedestination transition state attempted, available values:
  • FW_RENDERER_STATE_STARTED
  • FW_RENDERER_STATE_COMPLETED
  • FW_RENDERER_STATE_FAILED
detailsdetail info
  • For FW_RENDERER_STATE_FAILED:FW_INFO_KEY_ERROR_CODE are required. FW_INFO_KEY_ERROR_INFO is optional.
- (CLLocation * FWRendererController) location

Return the current location.

See also: -[FWAdManager setLocation:]

Returns
current location
- (void FWRendererController) log: (NSString *)  msg

Renderer should use this API to trace all logs.

- (id<FWContext> FWRendererController) notificationContext

Returns the sender of all FreeWheel related notifications.

- (void FWRendererController) processEvent: (NSString *)  eventName
info: (NSDictionary *)  details 

Process renderer event.

Parameters
eventNameEvent to be processed, one of FW_EVENT_AD_* in FWConstants.h

Valid eventName:

  • FW_EVENT_AD_FIRST_QUARTILE - firstQuartile
  • FW_EVENT_AD_MIDPOINT - midPoint
  • FW_EVENT_AD_THIRD_QUARTILE - thirdQuartile
  • FW_EVENT_AD_COMPLETE - complete
  • FW_EVENT_AD_CLICK - click
  • FW_EVENT_AD_PAUSE - IAB metric, pause
  • FW_EVENT_AD_RESUME - IAB metric, resume
  • FW_EVENT_AD_REWIND - IAB metric, rewind
  • FW_EVENT_AD_MUTE - IAB metric, mute
  • FW_EVENT_AD_UNMUTE - IAB metric, unmute
  • FW_EVENT_AD_COLLAPSE - IAB metric, collapse
  • FW_EVENT_AD_EXPAND - IAB metric, expand
  • FW_EVENT_AD_MINIMIZE - IAB metric, minimize
  • FW_EVENT_AD_CLOSE - IAB metric, close
  • FW_EVENT_AD_ACCEPT_INVITATION - IAB metric, accept invitation
Parameters
detailsAdditional information. Available keys:
  • FW_INFO_KEY_CUSTOM_EVENT_NAME Optional. Name of the custom event.
  • FW_INFO_KEY_SHOW_BROWSER Optional. Force opening / not opening click through url in WebView or Mobile Safari. If this key is not provided, AdManager will use the setting booked in MRM UI (recommended).
  • FW_INFO_KEY_URL Optional. URL to open or used as redirect url on FW_EVENT_AD_CLICK. If this key is not provided, the URL booked in MRM UI will be used.
- (NSArray * /* id<FWCreativeRendition> */ FWRendererController) renderableCreativeRenditions

Return all renderable renditions for Renderer.

Returns
an array of id<FWCreativeRendition>
- (void FWRendererController) requestContentStateChange: (BOOL)  DEPRECATED_ATTRIBUTE

Deprecated.

Please use [[rendererController context] requestTimelinePause] and [[rendererController context] requestTimelineResume] instead.

- (void FWRendererController) requestTimelinePause

Request timeline to pause.

The timeline consists of the content video and all linear slots. When the renderer or extension requires the timeline to be temporarily paused, e.g. when expanding to a fullscreen view that covers the whole player and other ads, calling this method will result in the notification FW_NOTIFICATION_CONTENT_PAUSE_REQUEST being dispatched from the current FWContext instance if content video is currently playing, and pause requests sent to all active temporal slots.

- (void FWRendererController) requestTimelineResume

Request timeline to resume.

The timeline consists of the content video and all linear slots. When the renderer or extension requires the timeline to be resumed, e.g. when dismissing a fullscreen view that covers the whole player and other ads, calling this method will result in the notification FW_NOTIFICATION_CONTENT_RESUME_REQUEST being dispatched from the current FWContext instance if content video is currently paused, and send resume requests to all active temporal slots.

- (NSArray * /* id<FWAdInstance> */ FWRendererController) scheduleAdInstances: (NSArray */*id< FWSlot > */)  DEPRECATED_ATTRIBUTE
- (NSArray * /* id<FWAdInstance> */ FWRendererController) scheduleAdInstancesInSlots: (NSArray */*id< FWSlot > */)  slots

Schedule ad instances for the given slots.

Parameters
slotsNSArray of id<FWSlot>, slots to schedule ads for
Returns
NSArray of scheduled id<FWAdInstance> in the same sequence of the passed in slot. nil if no ad instance can be scheduled for the corresponding slot.
- (void FWRendererController) setCapability: (NSString *)  eventCapability
: (FWCapabilityStatus)  DEPRECATED_ATTRIBUTE 
- (void FWRendererController) setCapability: (NSString *)  eventCapability
status: (FWCapabilityStatus)  status 

Declare a capability of the renderer.

Parameters
eventCapabilityOne of FW_EVENT_AD_* (NOT including FW_EVENT_AD_FIRST_QUARTILE, FW_EVENT_AD_THIRD_QUARTILE, FW_EVENT_AD_IMPRESSION) in FWConstants.h
statusON if renderer has specified capability or is able to send specified event

Note:
Changing renderer capability after renderer starts playing may result in undefined behaviour

- (NSUInteger FWRendererController) version

Return the Major version of AdManager, e.g.

0x02060000 for v2.6

Returns
version as NSUInteger

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