OOFreewheelManager Class Reference

A class that manages Freewheel ads. More...

#import "OOFreewheelManager.h"

+ Inheritance diagram for OOFreewheelManager:

Instance Methods

(id) - initWithOoyalaPlayerViewController:
 Initialize a OOFreewheelManager using the OOOoyalaPlayerViewController. More...
 
(id) - initWithOoyalaPlayer:
 Initialize a OOFreewheelManager using the OOOoyalaPlayer. More...
 
(void) - overrideFreewheelParameters:
 Sets the Freewheel ad parameters to override values from Backlot and Backdoor. More...
 
(void) - setup: [implementation]
 
(BOOL) - currentItemChanged [implementation]
 
(void) - addAdSpot: [implementation]
 Insert ad spot (for pre-rolls, it delays content playback as ads are being fetched) More...
 
(BOOL) - setupAdManager [implementation]
 Get the metadata and parse it to get all Freewheel ad parameters. More...
 
(NSString *) - getParameter:backlotKey: [implementation]
 Passes in the override key and the Backlot key and returns the correct value from 1.) The app level's overriden parameters from _fwParameters, 2.) Backdoor Third Party Module Metadata's Android specific values, or 3.) Backlot's cross platform values in the above order of priority. More...
 
(void) - submitAdRequest [implementation]
 Sets up the ad manager and submits the ad request If the ad request was successful, it will call onAdRequestCompleted() More...
 
(void) - onAdRequestCompleted: [implementation]
 Gets the pre, mid, and post-rolls when ad request is complete Play pre-rolls if _player.play() was called. More...
 
(void) - onAdEventError: [implementation]
 
(void) - onContentPauseRequest: [implementation]
 
(void) - onContentResumeRequest: [implementation]
 
(void) - clearPendingAdMode [implementation]
 
(void) - updateRollsAndDelegate [implementation]
 
(void) - updatePreMidPost [implementation]
 
(void) - playOverlays: [implementation]
 Check to play overlays. More...
 
(void) - playCompleted: [implementation]
 Tell Freewheel manager content completed playing. More...
 
(void) - stateChanged: [implementation]
 
(void) - destroy [implementation]
 
(void) - dealloc [implementation]
 
(void) - exitAdMode [implementation]
 
(BOOL) - onContentChanged [implementation]
 
(BOOL) - onInitialPlay [implementation]
 
(BOOL) - onPlayheadUpdate: [implementation]
 
(BOOL) - onContentError: [implementation]
 
(void) - onAdModeEntered [implementation]
 
(BOOL) - playAd: [implementation]
 
(void) - onError [implementation]
 
(void) - skipAd [implementation]
 
(id< OOPlayerProtocol >) - player [implementation]
 
(void) - setOpenClickThroughInApp: [implementation]
 
(void) - clickAd [implementation]
 
(void) - adsPlaying
 This is meant to be called only by the OOFreewheelAdPlayer. More...
 
(void) - onAdCompleted
 This is meant to be called only by the OOFreewheelAdPlayer. More...
 
(BOOL) - showAdLearnMoreButton
 This is meant to be called only by the OOFreewheelAdPlayer to query if native ad learnmore button needs to be used. More...
 
(BOOL) - showAdsControls
 This is meant to be called only by the OOFreewheelAdPlayer to query if freewheel controls need to be used. More...
 

Properties

id< FWContext > fwContext
 the Freewheel context from Freewheel SDK More...
 
OOStateNotifier * stateNotifier
 the state notifier to notify state changes More...
 
BOOL openClickThroughInApp
 if set to YES the ads click through url is opened in in-app web view, if set to NO the ads click through url is opened in an external browser, default value is NO More...
 
id< FWAdManager > adManager [implementation]
 The ads manager that plays a video ad. More...
 
OOOoyalaPlayer * contentPlayer [implementation]
 
OOOoyalaPlayerViewController * ooyalaPlayerViewController [implementation]
 
NSMutableArray * overlays [implementation]
 
BOOL haveDataToUpdate [implementation]
 
BOOL didUpdateRollsAndDelegate [implementation]
 
int fwNetworkId [implementation]
 
NSString * fwAdServer [implementation]
 
NSString * fwProfile [implementation]
 
NSString * fwSiteSectionId [implementation]
 
NSString * fwVideoAssetId [implementation]
 
NSString * fwFRMSegment [implementation]
 
NSMutableDictionary * fwParameters [implementation]
 
OOFreewheelAdPlayeradPlayer [implementation]
 
BOOL waitingForResponse [implementation]
 
BOOL adModePending [implementation]
 

Detailed Description

A class that manages Freewheel ads.

OOFreewheelManager.

OOFreewheelManager.h in OoyalaFreewheelSDK

Method Documentation

- (void) addAdSpot: (id<FWSlot>)  ad
implementation

Insert ad spot (for pre-rolls, it delays content playback as ads are being fetched)

Parameters
[in]theISlot to play
- (void) adsPlaying

This is meant to be called only by the OOFreewheelAdPlayer.

Provided by category OOFreewheelManager(Internal).

- (void) clearPendingAdMode
implementation
- (void) clickAd
implementation
- (BOOL) currentItemChanged
implementation
- (void) dealloc
implementation
- (void) destroy
implementation
- (void) exitAdMode
implementation
- (NSString *) getParameter: (NSString *)  overrideKey
backlotKey: (NSString *)  backlotKey 
implementation

Passes in the override key and the Backlot key and returns the correct value from 1.) The app level's overriden parameters from _fwParameters, 2.) Backdoor Third Party Module Metadata's Android specific values, or 3.) Backlot's cross platform values in the above order of priority.

A null value is returned if key is not found.

Parameters
[in]overrideKeythe name of the parameter to get from app level or from Backdoor
[in]backlotKeythe name of the parameter to get from Backlot
Returns
value of the parameter with key name
- (id) initWithOoyalaPlayer: (OOOoyalaPlayer *)  player

Initialize a OOFreewheelManager using the OOOoyalaPlayer.

Parameters
[in]playerthe OOOoylaPlayer
Returns
the initialized OOFreewheelManager
- (id) initWithOoyalaPlayerViewController: (OOOoyalaPlayerViewController *)  viewController

Initialize a OOFreewheelManager using the OOOoyalaPlayerViewController.

Parameters
[in]viewControllerthe OOOoylaPlayerViewController control the OOOoyalaPlayer's View
Returns
the initialized OOFreewheelManager
- (void) onAdCompleted

This is meant to be called only by the OOFreewheelAdPlayer.

Provided by category OOFreewheelManager(Internal).

- (void) onAdEventError: (NSNotification *)  notification
implementation
- (void) onAdModeEntered
implementation
- (void) onAdRequestCompleted: (NSNotification *)  notification
implementation

Gets the pre, mid, and post-rolls when ad request is complete Play pre-rolls if _player.play() was called.

- (BOOL) onContentChanged
implementation
- (BOOL) onContentError: (int)  errorCode
implementation
- (void) onContentPauseRequest: (NSNotification *)  notification
implementation
- (void) onContentResumeRequest: (NSNotification *)  notification
implementation
- (void) onError
implementation
- (BOOL) onInitialPlay
implementation
- (BOOL) onPlayheadUpdate: (Float64)  playhead
implementation
- (void) overrideFreewheelParameters: (NSMutableDictionary *)  freewheelParameters

Sets the Freewheel ad parameters to override values from Backlot and Backdoor.

 Key                            Example Value
"fw_android_mrm_network_id"    "42015"
"fw_android_ad_server"         "http://demo.v.fwmrm.net/"
"fw_android_player_profile"    "fw_tutorial_android"
"fw_android_site_section_id"   "fw_tutorial_android"
"fw_android_video_asset_id"    "fw_simple_tutorial_asset"
Parameters
[in]freewheelParametersDictionary with the above defined string keys and values
- (BOOL) playAd: (OOAdSpot *)  ad
implementation
- (void) playCompleted: (NSNotification *)  notification
implementation

Tell Freewheel manager content completed playing.

- (id< OOPlayerProtocol >) player
implementation
- (void) playOverlays: (Float64)  playheadTime
implementation

Check to play overlays.

If the playheadTime passes the ad's time to play, play only the first item on the list since other items may have different times to be played at.

- (void) setOpenClickThroughInApp: (BOOL)  openClickThroughInApp
implementation
- (void) setup: (OOOoyalaPlayer *)  player
implementation
- (BOOL) setupAdManager
implementation

Get the metadata and parse it to get all Freewheel ad parameters.

Call submitAdRequest only when all metadata were properly fetched.

- (BOOL) showAdLearnMoreButton

This is meant to be called only by the OOFreewheelAdPlayer to query if native ad learnmore button needs to be used.

Provided by category OOFreewheelManager(Internal).

- (BOOL) showAdsControls

This is meant to be called only by the OOFreewheelAdPlayer to query if freewheel controls need to be used.

Provided by category OOFreewheelManager(Internal).

- (void) skipAd
implementation
- (void) stateChanged: (NSNotification *)  notification
implementation
- (void) submitAdRequest
implementation

Sets up the ad manager and submits the ad request If the ad request was successful, it will call onAdRequestCompleted()

- (void) updatePreMidPost
implementation
- (void) updateRollsAndDelegate
implementation

Property Documentation

- (id<FWAdManager>) adManager
readwritenonatomicassignimplementation

The ads manager that plays a video ad.

- (BOOL) adModePending
readwriteatomicimplementation
- (OOFreewheelAdPlayer*) adPlayer
readwritenonatomicassignimplementation
- (OOOoyalaPlayer*) contentPlayer
readwritenonatomicweakimplementation
- (BOOL) didUpdateRollsAndDelegate
readwritenonatomicassignimplementation
- (NSString*) fwAdServer
readwritenonatomicassignimplementation
- (id<FWContext>) fwContext
readwritenonatomicassign

the Freewheel context from Freewheel SDK

- (NSString*) fwFRMSegment
readwritenonatomicassignimplementation
- (int) fwNetworkId
readwritenonatomicassignimplementation
- (NSMutableDictionary*) fwParameters
readwritenonatomicassignimplementation
- (NSString*) fwProfile
readwritenonatomicassignimplementation
- (NSString*) fwSiteSectionId
readwritenonatomicassignimplementation
- (NSString*) fwVideoAssetId
readwritenonatomicassignimplementation
- (BOOL) haveDataToUpdate
readwritenonatomicassignimplementation
- (OOOoyalaPlayerViewController*) ooyalaPlayerViewController
readwritenonatomicweakimplementation
- (BOOL) openClickThroughInApp
readwritenonatomicassign

if set to YES the ads click through url is opened in in-app web view, if set to NO the ads click through url is opened in an external browser, default value is NO

- (NSMutableArray*) overlays
readwritenonatomicassignimplementation
- (OOStateNotifier*) stateNotifier
readwritenonatomicassign

the state notifier to notify state changes

- (BOOL) waitingForResponse
readwriteatomicimplementation

The documentation for this class was generated from the following files: