The OoyalaPlayer is the heart of the playback system. More...

#import <OOOoyalaPlayerFacade.h>

+ Inheritance diagram for OOOoyalaPlayer:

Instance Methods

(instancetype) - initWithOoyalaAPIClient:
 Initialize an OOOoyalaPlayer with the given parameters. More...
 
(instancetype) - initWithPcode:domain:
 Initialize an OOOoyalaPlayer with the given parameters. More...
 
(instancetype) - initWithPcode:domain:options:
 Initialize an OOOoyalaPlayer with the given parameters. More...
 
(instancetype) - initWithPcode:domain:embedTokenGenerator:
 Initialize an OOOoyalaPlayer with the given parameters. More...
 
(instancetype) - initWithPcode:domain:embedTokenGenerator:options:
 Initialize an OOOoyalaPlayer with the given parameters. More...
 
(void) - setDesiredState:
 
(BOOL) - setStream:
 
(BOOL) - setStreams:
 
(BOOL) - setUnbundledVideo:
 Casting of OOUnbundledVideo is not supported. More...
 
(BOOL) - setEmbedCode:
 Reinitializes the player with a new embedCode. More...
 
(BOOL) - setEmbedCodes:
 Reinitializes the player with the new embedCodes (as an array). More...
 
(BOOL) - setEmbedCode:adSetCode:
 Reinitializes the player with a new embedCode and sets the ad set dynamically. More...
 
(BOOL) - setEmbedCodes:adSetCode:
 Reinitializes the player with the new embedCodes (as an array) and sets the ad set dynamically. More...
 
(BOOL) - setExternalId:
 Reinitializes the player with a new external ID. More...
 
(BOOL) - setExternalIds:
 Reinitializes the player with the new external IDs (as an array). More...
 
(void) - setRootItem:
 Reinitializes the player with a root item. More...
 
(void) - setAsset:
 Reinitializes the player with a new asset JSON. More...
 
(BOOL) - changeCurrentItemToEmbedCode:
 Sets the current video in a channel, if the video is present. More...
 
(BOOL) - changeCurrentItemToVideo:
 Sets the current video. More...
 
(BOOL) - changeUnbundledVideo:
 Set the unbundled HA video. More...
 
(void) - reauthorizeCurrentItemWithCallback:
 Performs authorization on the current item, refreshing teh auth token if necessary. More...
 
(OOOoyalaPlayerState) - state
 Gets the player's current state. More...
 
(void) - setCustomAnalyticsTags:
 DEPRECATED. More...
 
(void) - destroy
 
(OOOoyalaAPIClient *) - api
 Return an OoyalaAPIClient. More...
 
(NSString *) - dataFromFile:
 Returns a string with all the actions made by offline analytics. More...
 
(BOOL) - needPlayAdsOnInitialContentPlay
 
(BOOL) - needPlayAds:withParameter:
 
(void) - switchToContent
 
(OOAdType) - adType
 
(void) - processExitAdModes:adsPlayed:
 
(void) - onAdIconClicked:
 Called when an icon is clicked. More...
 
(void) - onAdOverlayClicked:
 Called when an ad overlay is clicked. More...
 
(void) - insertAds:
 Insert VAST ads to the managed ad plugin. More...
 
(void) - clickAd
 Click on the currently playing ad. More...
 
(void) - resetAds
 Reset the state of ad plays. More...
 
(void) - skipAd
 Skips the currently playing ad (if one is playing. More...
 
(void) - addAppLifeEventsObservers
 
(void) - initCastManager:
 
(void) - switchToCastMode
 
(void) - exitCastModeWithEmbedCode:playheadTime:isPlaying:
 
(BOOL) - isInCastMode
 
(BOOL) - nextVideo
 Tries to set the current video to the next video in the OOChannel or ChannetSet. More...
 
(BOOL) - previousVideo
 Tries to set the current video to the previous video in the OOChannel or ChannetSet. More...
 
(UIImage *) - screenshot
 
(void) - disablePlaylistClosedCaptions
 Disables the CC in the HLS Playlist. More...
 
(NSArray *) - availableClosedCaptionsLanguages
 Get the available closed captions languages. More...
 
(NSString *) - languageNameToLanguageCode:
 Get the short code from the natural language name. More...
 
(OOMoviePlayer *) - getCorrectMoviePlayer:
 
(BOOL) - hasMultipleAudioTracks
 Lets you know if the current video has multiple audio tracks. More...
 
(Float64) - duration
 Gets the duration of the asset. More...
 
(double) - bitrate
 Get the current bitrate. More...
 
(BOOL) - isAuthTokenExpired
 Checks the expiration of the authToken, and compares it to the current time. More...
 
(CMTimeRange) - seekableTimeRange
 current seekable range for main video. More...
 
(BOOL) - isShowingAd
 Get whether the player is playing ad. More...
 
(BOOL) - isShowingAdWithCustomControls
 
(Float64) - playheadTime
 Gets the current playhead time (the part of the video currently being accessed). More...
 
(NSDate *) - liveTime
 Gets the (approximate) real time of a live stream. More...
 
(Float64) - bufferedTime
 Get the maximum buffered time. More...
 
(BOOL) - isPlaying
 Get whether the player is playing. More...
 
(NSSet *) - getCuePointsAtSecondsForCurrentPlayer
 Return a collection of the times at which to show cue points. More...
 
(void) - togglePictureInPictureMode
 Toggle the picture in picture mode iOS 9 and up only. More...
 
(void) - setPlayheadTime:
 Sets the current playhead time of the player (same as seek). More...
 
(void) - seek:
 Sets the current playhead time of the player (same as setPlayheadTime). More...
 
(void) - seekCompleted
 
(void) - pause
 Pauses the current video. More...
 
(void) - play
 Plays the current video. More...
 
(void) - playWithInitialTime:
 Plays the current video with an initial time. More...
 
(void) - prepareContent
 
(void) - observeValueForKeyPath:ofObject:change:context:
 
(void) - onComplete
 
(void) - onContentError
 
(void) - stopPlaybackOnHeartbeatFailure:
 
(void) - changePlayerState:
 
(void) - setState:
 
(void) - exitPlayerStatePlaying
 
(void) - enterPlayerStatePlaying
 
(void) - exitPlayerStateLoading
 
(void) - enterPlayerStateLoading
 
(void) - exitPlayerStateCompleted
 
(void) - enterPlayerStateCompleted
 
(void) - exitPlayerStateReady
 
(void) - enterPlayerStateReady
 
(void) - showPromoImage
 
(void) - hidePromoImage
 
(CGRect) - videoRect
 
(void) - layoutSubviews
 internal Ooyala use only. More...
 

Class Methods

(void) + setEnvironment:
 Set which environment is used for Player APIs. More...
 
(void) + setSSLEnvironmentEnabled:
 Set if SSL is used for Player APIs. More...
 
(NSString *) + version
 Get the version and RC of the Ooyala SDK. More...
 
(BOOL) + useDebugDRMPlayback
 
(void) + setEncryptedLoopback:
 set encryptedloopback. More...
 
(BOOL) + encryptedLoopback
 get encryptedloopback. More...
 
(void) + setUseDebugDRMPlayback:
 YES means to try to use local/debug DRM modes, NO means to use regular DRM config. More...
 
(OOIQAnalyticsTrackingState) + iqAnalyticsTrackingState
 Use to get state for Ooyala Analytics (IQ) tracking. More...
 
(void) + setIqAnalyticsTrackingState:
 Use to set different states for Ooyala Analytics (IQ) tracking. More...
 

Public Attributes

NSString *const OOOoyalaPlayerTimeChangedNotification
 The name used for notifications when playhead time changes. More...
 
NSString *const OOOoyalaPlayerStateChangedNotification
 The name used for notifications when the player's state changes. More...
 
NSString *const OOOoyalaPlayerDesiredStateChangedNotification
 The name used for notifications when the player's desired state changes. More...
 
NSString *const OOOoyalaPlayerContentTreeReadyNotification
 The name used for notifications when the upcoming asset's content tree is ready and can be accessed. More...
 
NSString *const OOOoyalaPlayerMetadataReadyNotification
 The name used for notifications when the upcoming asset's metadata is ready and can be accessed. More...
 
NSString *const OOOoyalaPlayerAuthorizationReadyNotification
 The name used for notifications when the upcoming asset's authorization status is ready and can be accessed. More...
 
NSString *const OOOoyalaPlayerCurrentItemChangedNotification
 The name used for notifications when all of the upcoming asset's metadata is ready, and the item is ready to be played. More...
 
NSString *const OOOoyalaPlayerPlayStartedNotification
 The name used for notifications when video playback starts. More...
 
NSString *const OOOoyalaplayerLicenseAcquisitionNotification
 The name used for notifications which fire after a successful license acquisition. More...
 
NSString *const OOOoyalaPlayerPlayCompletedNotification
 The name used for notifications which fire when video playback is completed. More...
 
NSString *const OOOoyalaPlayerAdOverlayNotification
 The name used for notifications which fire when an ad overlay should be displayed. More...
 
NSString *const OOOoyalaPlayerAdPodStartedNotification
 The name used for notifications which fire when an ad manager has control of the OoyalaPlayer. More...
 
NSString *const OOOoyalaPlayerAdStartedNotification
 The name used for notifications which fire when a linear advertisement starts playing back. More...
 
NSString *const OOOoyalaPlayerAdCompletedNotification
 The name used for notifications which fire when a linear advertisement has been completed. More...
 
NSString *const OOOoyalaPlayerAdPodCompletedNotification
 The name used for notifications which fire when an ad manager has ceded control of the OoyalaPlayer, and content should resume. More...
 
NSString *const OOOoyalaPlayerAdsLoadedNotification
 The name used for notifications which fire when ads are completed loading. More...
 
NSString *const OOOoyalaPlayerAdSkippedNotification
 The name used for notifications which fire when an advertisement is skipped. More...
 
NSString *const OOOoyalaPlayerAdTappedNotification
 The name used for notifications which fire when an advertisement is tapped (IMA only). More...
 
NSString *const OOOoyalaPlayerContentResumedAfterAdNotification
 The name used for notifications which fire when content should resume after an advertisement. More...
 
NSString *const OOOoyalaPlayerErrorNotification
 The name used for notifications which fire when an irrecoverable error occurs. More...
 
NSString *const OOOoyalaPlayerAdErrorNotification
 The name used for notifications which fire when a recoverrable error occurs during an ad. More...
 
NSString *const OOOoyalaPlayerCCManifestChangedNotification
 The name used for notifications which fire when the closed captions are in manifest. More...
 
NSString *const OOOoyalaPlayerLanguageChangedNotification
 The name used for notifications which fire when the closed captions language is changed. More...
 
NSString *const OOOoyalaPlayerSeekStartedNotification
 The name used for notifications which fire when seek is initialized. More...
 
NSString *const OOOoyalaPlayerSeekCompletedNotification
 The name used for notifications which fire when seek is completed. More...
 
NSString *const OOOoyalaPlayerJsonReceivedNotification
 The name used for notifications which fire JSON is received (i.e. ID3 tags). More...
 
NSString *const OOOoyalaPlayerEmbedCodeSetNotification
 The name used for notifications which fire the Embed Code (aka Content ID) has been changed. More...
 
NSString *const OOOoyalaPlayerBitrateChangedNotification
 The name used for notifications which fire when bitrate has changed in video playback. More...
 
NSString *const OOOoyalaPlayerBufferingStartedNotification
 Notification when buffering starts in the player. More...
 
NSString *const OOOoyalaPlayerBufferingCompletedNotification
 Notification when buffering completes in the player. More...
 
NSString *const OOOoyalaplayerExternalPlaybackActiveNotification
 Notificaation when video get connected or disconnected to airplay. More...
 
NSString *const OOOoyalaPlayerVideoHasVRContent
 Notification when we handle vr metatag. More...
 
NSString *const OOOoyalaVRPlayerDidConfigured
 Notification when VR player did configured. More...
 
NSString *const OOOoyalaPlayerSwitchSceneNotification
 Notification when pressed switch between stereo and mono. More...
 
NSString *const OOOoyalaPlayerHandleTouchNotification
 Notification when video view handle touch. More...
 
NSString *const OOOoyalaPlayerMultiAudioEnabledNotification
 Notification when asset have multi audio. More...
 
NSString *const OOOoyalaPlayerAudioTrackChangedNotification
 Notification when audio track changed. More...
 
NSString *const OOOoyalaPlayerSsaiAdsMetadataReceivedNotification
 Notification when received the ads metadata for SSAI. More...
 
NSString *const OOOoyalaPlayerSsaiPlaySingleAdNotification
 Notification when an ssai ad break has started. More...
 
NSString *const OOOoyalaPlayerSsaiSingleAdPlayedNotification
 Notification when an SSAI ad break has ended. More...
 
NSString *const OOOoyalaPlayerPlaybackSpeedEnabledNotification
 Notification when asset is available for playback speed. More...
 
NSString *const OOOoyalaPlayerPlaybackSpeedRateChangedChangedNotification
 Notification when playback speed rate changed. More...
 
NSString *const OOOoyalaPlayerApplicationVolumeChangedNotification
 Notification when application volume changed. More...
 
NSString *const OOIQCONFIGURATION_DEFAULT_PLAYER_ID
 

Properties

OOVideocurrentItem
 The OOOoyalaPlayer's currently playing OOVideo. More...
 
OOContentItemrootItem
 The OOOoyalaPlayer's embedded content (OOVideo, OOChannel, or OOChannelSet) More...
 
NSDictionary * metadata
 The OOOoyalaPlayer's content metadata for currently loaded content. More...
 
OOOoyalaErrorerror
 The OOOoyalaPlayer's current error if it exists. More...
 
OOOoyalaPlayerSessionIDManager * sessionIDManager
 
UIView * view
 the view associated with the player More...
 
OOOoyalaPlayerVideoGravity videoGravity
 
BOOL supportsVideoGravityButton
 
BOOL seekable
 Whether or not the Videos that OOOoyalaPlayer plays are seekable. More...
 
BOOL adsSeekable
 Whether or not the Ads that OOOoyalaPlayer plays are seekable. More...
 
OOSeekStyle seekStyle
 
NSString * closedCaptionsLanguage
 the current closed captions language, or nil to hide closed captions. More...
 
BOOL isAudioOnlyStreamPlaying
 Get whether the player is playing the audio only stream in an m3u8. More...
 
BOOL closedCaptionsTrackAvailable
 
OOCurrentItemChangedCallback currentItemChangedCallback
 A callback that will be called every time the current item is changed. More...
 
OOOoyalaPlayerActionAtEnd actionAtEnd
 the OOOoyalaPlayerActionAtEnd to perform when the current item finishes playing. More...
 
BOOL externalPlaybackActive
 
BOOL allowsExternalPlayback
 
BOOL usesExternalPlaybackWhileExternalScreenIsActive
 
float playbackRate
 When external playback is enabled, this will share the video view to the external screen only, instead of mirroring the device. More...
 
NSString * authToken
 The Auth Token provided by Ooyala Authorization, when using Ooyala Player Token. More...
 
NSString * playerSessionId
 A Session ID that is created at the initialization of OoyalaPlayer. More...
 
NSString * contentSessionId
 A Session ID that is created on the set of a new piece of content (i.e setEmbedCode). More...
 
float volume
 The volume of the OoyalaPlayer, relative to the device's volume setting. More...
 
NSString * userAgent
 This property can be used to set the User-Agent for manifest requests served by AVPlayer. More...
 
OOAssetLoaderDelegateassetLoaderDelegate
 This property can be used to pass Custom Implementation of AVAssetResourceLoaderDelegate from AVFoundation. More...
 
NSString * customDrmData
 
OOStreamPlayerMapping * streamPlayerMapping
 
NSString * pcode
 
OOOoyalaPlayerDesiredState desiredState
 Gets the user's current desired state. More...
 
OOManagedAdsPluginmanagedAdsPlugin
 Get the managedAdsPlugin that manages OOOoyalaAdSpots and OOVASTAdSpots. More...
 
OOOptionsoptions
 Get the options. More...
 
OOUIProgressSliderMode normalSliderMode
 
OOAudioSessionaudioSession
 
BOOL pipActivated
 
BOOL audioOnly
 

Detailed Description

The OoyalaPlayer is the heart of the playback system.

Use it to configure and control asset playback, and to be aware of playback state changes.

Method Documentation

- (void) addAppLifeEventsObservers

Provided by category OOOoyalaPlayer(AppEvents).

- (OOAdType) adType

Provided by category OOOoyalaPlayer(Ads).

- (OOOoyalaAPIClient *) api

Return an OoyalaAPIClient.

- (NSArray *) availableClosedCaptionsLanguages

Get the available closed captions languages.

Returns
an NSArray containing the available closed captions languages as NSStrings

Provided by category OOOoyalaPlayer(ClosedCaptions).

- (double) bitrate

Get the current bitrate.

Returns
a double indicating the current bitrate in bytes

Provided by category OOOoyalaPlayer(Playback).

- (Float64) bufferedTime

Get the maximum buffered time.

Returns
the buffered time in seconds of the currently playing item

Provided by category OOOoyalaPlayer(Playback).

- (BOOL) changeCurrentItemToEmbedCode: (NSString *)  embedCode

Sets the current video in a channel, if the video is present.

Parameters
[in]embedCodethe embed code of the video to play
Returns
YES if successful; otherwise, returns NO (check OOOoyalaPlayer.error for reason)
- (BOOL) changeCurrentItemToVideo: (OOVideo *)  video

Sets the current video.

OOVideo must be a part of the content tree provided by the root item.

Returns
a BOOL indicating that the item was successfully changed
- (void) changePlayerState: (OOOoyalaPlayerState)  state

Provided by category OOOoyalaPlayer(StateMachine).

- (BOOL) changeUnbundledVideo: (OOVideo *)  video

Set the unbundled HA video.

Returns
a BOOL indicating that the item was successfully changed
- (void) clickAd

Click on the currently playing ad.

Provided by category OOOoyalaPlayer(Ads).

- (NSString *) dataFromFile: (NSString *)  embedCode

Returns a string with all the actions made by offline analytics.

Parameters
[in]embedCodeof the offline file
Returns
a string with a list of the actions
- (void) destroy
- (void) disablePlaylistClosedCaptions

Disables the CC in the HLS Playlist.

Provided by category OOOoyalaPlayer(ClosedCaptions).

- (Float64) duration

Gets the duration of the asset.

Returns
the duration of the currently playing asset, in seconds

Provided by category OOOoyalaPlayer(Playback).

+ (BOOL) encryptedLoopback

get encryptedloopback.

Returns
encryptedLoopback;
- (void) enterPlayerStateCompleted

Provided by category OOOoyalaPlayer(StateMachine).

- (void) enterPlayerStateLoading

Provided by category OOOoyalaPlayer(StateMachine).

- (void) enterPlayerStatePlaying

Provided by category OOOoyalaPlayer(StateMachine).

- (void) enterPlayerStateReady

Provided by category OOOoyalaPlayer(StateMachine).

- (void) exitCastModeWithEmbedCode: (NSString *)  embedCode
playheadTime: (Float64)  playheadTime
isPlaying: (BOOL)  isPlaying 

Provided by category OOOoyalaPlayer(Cast).

- (void) exitPlayerStateCompleted

Provided by category OOOoyalaPlayer(StateMachine).

- (void) exitPlayerStateLoading

Provided by category OOOoyalaPlayer(StateMachine).

- (void) exitPlayerStatePlaying

Provided by category OOOoyalaPlayer(StateMachine).

- (void) exitPlayerStateReady

Provided by category OOOoyalaPlayer(StateMachine).

- (OOMoviePlayer *) getCorrectMoviePlayer: (OOVideo *)  video

Provided by category OOOoyalaPlayer(MoviePlayerCreation).

- (NSSet *) getCuePointsAtSecondsForCurrentPlayer

Return a collection of the times at which to show cue points.

E.g. for the content player, show when ads are scheduled to play.NSNumber int seconds>

Provided by category OOOoyalaPlayer(Playback).

- (BOOL) hasMultipleAudioTracks

Lets you know if the current video has multiple audio tracks.

It requires that a video has already loaded.

The following code snippet shows an example of this method. It assumes you are listening to the events of the OOOoyalaPlayer using notifications:

// assumes you are observing OOOoyalaPlayer notifications and you have a property
// like `@property OOOoyalaPlayer *player;`
if ([notification.name isEqualToString:OOOoyalaPlayerStateChangedNotification]) {
NSNumber *state = notification.userInfo[@"newState"];
if (state.intValue == OOOoyalaPlayerStateReady) {
NSLog(@"has audio tracks: %d", [self.player hasMultipleAudioTracks]);
}
}
Returns
true if there are more than one audio tracks, false otherwise.

Provided by category OOOoyalaPlayer(MultiAudio).

- (void) hidePromoImage

Provided by category OOOoyalaPlayer(UI).

- (void) initCastManager: (OOCastManager *)  castManager

Provided by category OOOoyalaPlayer(Cast).

- (instancetype) initWithOoyalaAPIClient: (OOOoyalaAPIClient *)  apiClient

Initialize an OOOoyalaPlayer with the given parameters.

Parameters
[in]apiClientthe initialized OOOoyalaAPIClient to use
Returns
the initialized OOOoyalaPlayer
- (instancetype) initWithPcode: (NSString *)  pcode
domain: (OOPlayerDomain *)  domain 

Initialize an OOOoyalaPlayer with the given parameters.

Parameters
[in]pcodeYour Provider Code
[in]domainYour Embed Domain
Returns
the initialized OOOoyalaPlayer
- (instancetype) initWithPcode: (NSString *)  pcode
domain: (OOPlayerDomain *)  domain
embedTokenGenerator: (id< OOEmbedTokenGenerator >)  embedTokenGenerator 

Initialize an OOOoyalaPlayer with the given parameters.

Parameters
[in]pcodeYour Provider Code
[in]domainYour Embed Domain
[in]embedTokenGeneratorthe initialized OOEmbedTokenGenerator to use
Returns
the initialized OOOoyalaPlayer
- (instancetype) initWithPcode: (NSString *)  pcode
domain: (OOPlayerDomain *)  domain
embedTokenGenerator: (id< OOEmbedTokenGenerator >)  embedTokenGenerator
options: (OOOptions *)  options 

Initialize an OOOoyalaPlayer with the given parameters.

Parameters
[in]pcodeYour Provider Code
[in]domainYour Embed Domain
[in]embedTokenGeneratorthe initialized OOEmbedTokenGenerator to use
[in]optionsExtra settings
Returns
the initialized OOOoyalaPlayer
- (instancetype) initWithPcode: (NSString *)  pcode
domain: (OOPlayerDomain *)  domain
options: (OOOptions *)  options 

Initialize an OOOoyalaPlayer with the given parameters.

Parameters
[in]pcodeYour Provider Code
[in]domainYour Embed Domain
[in]optionsthe options
Returns
the initialized OOOoyalaPlayer
- (void) insertAds: (NSMutableArray *)  ads

Insert VAST ads to the managed ad plugin.

Parameters
adsthe ads to be inserted

Provided by category OOOoyalaPlayer(Ads).

+ (OOIQAnalyticsTrackingState) iqAnalyticsTrackingState

Use to get state for Ooyala Analytics (IQ) tracking.

Returns
Returns state for Ooyala Analytics (IQ) tracking.
- (BOOL) isAuthTokenExpired

Checks the expiration of the authToken, and compares it to the current time.

Returns
YES if token is expired, NO otherwise

Provided by category OOOoyalaPlayer(Playback).

- (BOOL) isInCastMode

Provided by category OOOoyalaPlayer(Cast).

- (BOOL) isPlaying

Get whether the player is playing.

Returns
a BOOL indicating the current player is playing

Provided by category OOOoyalaPlayer(Playback).

- (BOOL) isShowingAd

Get whether the player is playing ad.

Returns
a BOOL indicating the current player is playing ad

Provided by category OOOoyalaPlayer(Playback).

- (BOOL) isShowingAdWithCustomControls
Returns
YES if self.isShowingAd==YES and the ad player reports that it has custom controls, instead of using the Ooyala video controls.

Provided by category OOOoyalaPlayer(Playback).

- (NSString*) languageNameToLanguageCode: (NSString *)  name

Get the short code from the natural language name.

Example: name="english", code="en".

Parameters
nameis the long name, from availableClosedCaptionsLanguages.
Returns
the short cc code. If the reverse mapping fails, the original name parameter value is returned.

Provided by category OOOoyalaPlayer(ClosedCaptions).

- (void) layoutSubviews

internal Ooyala use only.

Provided by category OOOoyalaPlayer(UI).

- (NSDate *) liveTime

Gets the (approximate) real time of a live stream.

Returns
currently playing time

Provided by category OOOoyalaPlayer(Playback).

- (BOOL) needPlayAds: (OOAdMode)  mode
withParameter: (NSNumber *)  parameter 

Provided by category OOOoyalaPlayer(Ads).

- (BOOL) needPlayAdsOnInitialContentPlay

Provided by category OOOoyalaPlayer(Ads).

- (BOOL) nextVideo

Tries to set the current video to the next video in the OOChannel or ChannetSet.

Returns
a BOOL indicating that the item was successfully changed

Provided by category OOOoyalaPlayer(Channel).

- (void) observeValueForKeyPath: (NSString *)  keyPath
ofObject: (id)  object
change: (NSDictionary *)  change
context: (void *)  context 

Provided by category OOOoyalaPlayer(PlaybackWorkflow).

- (void) onAdIconClicked: (NSInteger)  index

Called when an icon is clicked.

Parameters
indexthe index of the icon

Provided by category OOOoyalaPlayer(Ads).

- (void) onAdOverlayClicked: (NSString *)  clickUrl

Called when an ad overlay is clicked.

Parameters
clickUrlthe url of the overlay

Provided by category OOOoyalaPlayer(Ads).

- (void) onComplete

Provided by category OOOoyalaPlayer(PlaybackWorkflow).

- (void) onContentError

Provided by category OOOoyalaPlayer(PlaybackWorkflow).

- (void) pause

Pauses the current video.

Provided by category OOOoyalaPlayer(Playback).

- (void) play

Plays the current video.

Provided by category OOOoyalaPlayer(Playback).

- (Float64) playheadTime

Gets the current playhead time (the part of the video currently being accessed).

Returns
the current playhead time, in milliseconds

Provided by category OOOoyalaPlayer(Playback).

- (void) playWithInitialTime: (Float64)  time

Plays the current video with an initial time.

Provided by category OOOoyalaPlayer(Playback).

- (void) prepareContent

Provided by category OOOoyalaPlayer(PlaybackWorkflow).

- (BOOL) previousVideo

Tries to set the current video to the previous video in the OOChannel or ChannetSet.

Returns
a BOOL indicating that the item was successfully changed

Provided by category OOOoyalaPlayer(Channel).

- (void) processExitAdModes: (OOAdMode)  mode
adsPlayed: (BOOL)  played 

Provided by category OOOoyalaPlayer(Ads).

- (void) reauthorizeCurrentItemWithCallback: (OOAuthorizeCallback)  callback

Performs authorization on the current item, refreshing teh auth token if necessary.

Parameters
callbacka callback with error if present
- (void) resetAds

Reset the state of ad plays.

Calling this will cause all ads which have been played to play again.

Provided by category OOOoyalaPlayer(Ads).

- (UIImage *) screenshot
Returns
current frame of current asset

Provided by category OOOoyalaPlayer(Channel).

- (void) seek: (Float64)  time

Sets the current playhead time of the player (same as setPlayheadTime).

Parameters
[in]timethe playhead time, in seconds

Provided by category OOOoyalaPlayer(Playback).

- (CMTimeRange) seekableTimeRange

current seekable range for main video.

Provided by category OOOoyalaPlayer(Playback).

- (void) seekCompleted

Provided by category OOOoyalaPlayer(Playback).

- (void) setAsset: (NSDictionary *)  asset

Reinitializes the player with a new asset JSON.

Parameters
[in]assetthe new asset JSON to use
- (void) setCustomAnalyticsTags: (NSArray *)  tags

DEPRECATED.

Sets a tag for custom analytics.

Parameters
[in]tagsn array of NSStrings
- (void) setDesiredState: (OOOoyalaPlayerDesiredState)  desiredState
- (BOOL) setEmbedCode: (NSString *)  embedCode

Reinitializes the player with a new embedCode.

Parameters
[in]embedCodethe embed code to use
Returns
YES if successful; otherwise, returns NO (check OOOoyalaPlayer.error for reason)
- (BOOL) setEmbedCode: (NSString *)  embedCode
adSetCode: (NSString *)  adSetCode 

Reinitializes the player with a new embedCode and sets the ad set dynamically.

Parameters
[in]embedCodethe embed code to use
[in]adSetCode(possibly nil) the ad set code to use
Returns
YES if successful; otherwise, returns NO (check OOOoyalaPlayer.error for reason)
- (BOOL) setEmbedCodes: (NSArray *)  embedCodes

Reinitializes the player with the new embedCodes (as an array).

Parameters
[in]embedCodesthe embed code(s) to use. If more than one is specified, OOOoyalaPlayer.rootItem becomes a OODynamicChannel.
Returns
YES if successful; otherwise, returns NO (check OOOoyalaPlayer.error for reason)
- (BOOL) setEmbedCodes: (NSArray *)  embedCodes
adSetCode: (NSString *)  adSetCode 

Reinitializes the player with the new embedCodes (as an array) and sets the ad set dynamically.

Parameters
[in]embedCodesthe embed code(s) to use. If more than one is specified, OOOoyalaPlayer.rootItem becomes a OODynamicChannel.
[in]adSetCode(possibly nil) the ad set code to use.
Returns
YES if successful; otherwise, returns NO (check OOOoyalaPlayer.error for reason)
+ (void) setEncryptedLoopback: (BOOL)  enabled

set encryptedloopback.

Parameters
[in]enabledtrue if enabled, false if disabled
+ (void) setEnvironment: (OOOoyalaPlayerEnvironment)  e

Set which environment is used for Player APIs.

Default OOOoyalaPlayerEnvironmentProduction

- (BOOL) setExternalId: (NSString *)  externalId

Reinitializes the player with a new external ID.

External IDs enable you to assign custom identifiers to your assets so they are easier to organize, update, and modify.

Parameters
[in]externalIdthe external ID to use
Returns
YES if successful; otherwise, returns NO (check OOOoyalaPlayer.error for reason)
- (BOOL) setExternalIds: (NSArray *)  externalIds

Reinitializes the player with the new external IDs (as an array).

External IDs enable you to assign custom identifiers to your assets so they are easier to organize, update, and modify.

Parameters
[in]externalIdsthe external ID(s) to use. If more than one is specified, OOOoyalaPlayer.rootItem becomes a OODynamicChannel.
Returns
YES if successful; otherwise, returns NO (check OOOoyalaPlayer.error for reason)
+ (void) setIqAnalyticsTrackingState: (OOIQAnalyticsTrackingState)  state

Use to set different states for Ooyala Analytics (IQ) tracking.

Default OOIQAnalyticsTrackingStateDefault.

Warning
Property should be set before creating an instance of OOoyalaPlayer.
Parameters
[in]stateThe IQ analytics state
- (void) setPlayheadTime: (Float64)  time

Sets the current playhead time of the player (same as seek).

For example, to start a video at the 30 second point, you would set the playhead to 30.

Parameters
[in]timethe playhead time, in seconds

Provided by category OOOoyalaPlayer(Playback).

- (void) setRootItem: (OOContentItem *)  theRootItem

Reinitializes the player with a root item.

Parameters
[in]theRootItemthe root item to use
+ (void) setSSLEnvironmentEnabled: (BOOL)  sslEnabled

Set if SSL is used for Player APIs.

Default YES

- (void) setState: (OOOoyalaPlayerState)  state

Provided by category OOOoyalaPlayer(StateMachine).

- (BOOL) setStream: (OOStream *)  stream
Parameters
[in]streamnon-nil, non-empty NSArray containing OOStreams.
- (BOOL) setStreams: (NSArray *)  streams
Parameters
[in]streamsnon-nil, non-empty NSArray containing OOStreams.
- (BOOL) setUnbundledVideo: (OOUnbundledVideo *)  unbundledVideo

Casting of OOUnbundledVideo is not supported.

Parameters
[in]unbundledVideonon-nil OOUnbundledVideo containing OOStreams.
+ (void) setUseDebugDRMPlayback: (BOOL)  enable

YES means to try to use local/debug DRM modes, NO means to use regular DRM config.

- (void) showPromoImage

Provided by category OOOoyalaPlayer(UI).

- (void) skipAd

Skips the currently playing ad (if one is playing.

does nothing if not)

Provided by category OOOoyalaPlayer(Ads).

- (OOOoyalaPlayerState) state

Gets the player's current state.

Returns
a string containing the current state
- (void) stopPlaybackOnHeartbeatFailure: (OOAuthHeartbeat *)  sender

Provided by category OOOoyalaPlayer(PlaybackWorkflow).

- (void) switchToCastMode

Provided by category OOOoyalaPlayer(Cast).

- (void) switchToContent

Provided by category OOOoyalaPlayer(Ads).

- (void) togglePictureInPictureMode

Toggle the picture in picture mode iOS 9 and up only.

Provided by category OOOoyalaPlayer(Playback).

+ (BOOL) useDebugDRMPlayback
Returns
YES means to try to use local/debug DRM modes, NO means to use regular DRM config.
+ (NSString *) version

Get the version and RC of the Ooyala SDK.

Returns
the string that represents the SDK version
- (CGRect) videoRect
Returns
the video rect

Provided by category OOOoyalaPlayer(UI).

Member Data Documentation

- (NSString* const) OOIQCONFIGURATION_DEFAULT_PLAYER_ID

The default player ID value: "ooyala ios player"

- (NSString* const) OOOoyalaPlayerAdCompletedNotification

The name used for notifications which fire when a linear advertisement has been completed.

Nothing is provided through UserInfo.

- (NSString* const) OOOoyalaPlayerAdErrorNotification

The name used for notifications which fire when a recoverrable error occurs during an ad.

Nothing is provided through UserInfo.

- (NSString* const) OOOoyalaPlayerAdOverlayNotification

The name used for notifications which fire when an ad overlay should be displayed.

Nothing is provided through UserInfo. This applies to Ooyala-managed VAST Advertisements only.

- (NSString* const) OOOoyalaPlayerAdPodCompletedNotification

The name used for notifications which fire when an ad manager has ceded control of the OoyalaPlayer, and content should resume.

Nothing is provided through UserInfo.

- (NSString* const) OOOoyalaPlayerAdPodStartedNotification

The name used for notifications which fire when an ad manager has control of the OoyalaPlayer.

Nothing is provided through UserInfo. Ads may or may not play during this time.

- (NSString* const) OOOoyalaPlayerAdSkippedNotification

The name used for notifications which fire when an advertisement is skipped.

Nothing is provided through UserInfo. This only applies to VAST advertisements.

- (NSString* const) OOOoyalaPlayerAdsLoadedNotification

The name used for notifications which fire when ads are completed loading.

Nothing is provided through UserInfo. This only applies to Freewheel and Pulse advertisements.

- (NSString* const) OOOoyalaPlayerAdStartedNotification

The name used for notifications which fire when a linear advertisement starts playing back.

Nothing is provided through UserInfo.

- (NSString* const) OOOoyalaPlayerAdTappedNotification

The name used for notifications which fire when an advertisement is tapped (IMA only).

Nothing is provided through UserInfo. This only applies to IMA advertisements.

- (NSString* const) OOOoyalaPlayerApplicationVolumeChangedNotification

Notification when application volume changed.

- (NSString* const) OOOoyalaPlayerAudioTrackChangedNotification

Notification when audio track changed.

- (NSString* const) OOOoyalaPlayerAuthorizationReadyNotification

The name used for notifications when the upcoming asset's authorization status is ready and can be accessed.

Nothing is provided through UserInfo.

- (NSString* const) OOOoyalaPlayerBitrateChangedNotification

The name used for notifications which fire when bitrate has changed in video playback.

Nothing is provided through UserInfo. You should be able to check bitrate (OOOoyalaPlayer(Playback)) for a new value.

- (NSString* const) OOOoyalaPlayerBufferingCompletedNotification

Notification when buffering completes in the player.

No additional data provided. This notification is for the user to know that the current buffer of the player is full and it is ready to resume playback.

- (NSString* const) OOOoyalaPlayerBufferingStartedNotification

Notification when buffering starts in the player.

No additional data provided. This notification is for the user to know that the current buffer of the player is empty and it is trying to get more data to resume playback.

- (NSString* const) OOOoyalaPlayerCCManifestChangedNotification

The name used for notifications which fire when the closed captions are in manifest.

Nothing is provided through UserInfo.

- (NSString* const) OOOoyalaPlayerContentResumedAfterAdNotification

The name used for notifications which fire when content should resume after an advertisement.

Nothing is provided through UserInfo.

- (NSString* const) OOOoyalaPlayerContentTreeReadyNotification

The name used for notifications when the upcoming asset's content tree is ready and can be accessed.

Nothing is provided through UserInfo.

- (NSString* const) OOOoyalaPlayerCurrentItemChangedNotification

The name used for notifications when all of the upcoming asset's metadata is ready, and the item is ready to be played.

Nothing is provided through UserInfo.

See also
currentItem
- (NSString* const) OOOoyalaPlayerDesiredStateChangedNotification

The name used for notifications when the player's desired state changes.

UserInfo is a dictionary with a key "newState" with a value of OOOoyalaPlayerDesiredState.

- (NSString* const) OOOoyalaPlayerEmbedCodeSetNotification

The name used for notifications which fire the Embed Code (aka Content ID) has been changed.

Nothing is provided through UserInfo.

- (NSString* const) OOOoyalaPlayerErrorNotification

The name used for notifications which fire when an irrecoverable error occurs.

Nothing is provided through UserInfo. You should check the error when you get this.

See also
error
- (NSString* const) OOOoyalaplayerExternalPlaybackActiveNotification

Notificaation when video get connected or disconnected to airplay.

No additional data provided. This notification is for the user to know that phone is now connected or disconnected with airplay.

- (NSString* const) OOOoyalaPlayerHandleTouchNotification

Notification when video view handle touch.

Data contains touch coordinates and event name.

- (NSString* const) OOOoyalaPlayerJsonReceivedNotification

The name used for notifications which fire JSON is received (i.e. ID3 tags).

UserInfo is a dictionary with keys and values that were all in the JSON from the ID3 tag.

- (NSString* const) OOOoyalaPlayerLanguageChangedNotification

The name used for notifications which fire when the closed captions language is changed.

Nothing is provided through UserInfo. You can get the language from closedCaptionsLanguage.

See also
closedCaptionsLanguage
- (NSString* const) OOOoyalaplayerLicenseAcquisitionNotification

The name used for notifications which fire after a successful license acquisition.

Nothing is provided through UserInfo.

- (NSString* const) OOOoyalaPlayerMetadataReadyNotification

The name used for notifications when the upcoming asset's metadata is ready and can be accessed.

Nothing is provided through UserInfo.

- (NSString* const) OOOoyalaPlayerMultiAudioEnabledNotification

Notification when asset have multi audio.

- (NSString* const) OOOoyalaPlayerPlaybackSpeedEnabledNotification

Notification when asset is available for playback speed.

- (NSString* const) OOOoyalaPlayerPlaybackSpeedRateChangedChangedNotification

Notification when playback speed rate changed.

- (NSString* const) OOOoyalaPlayerPlayCompletedNotification

The name used for notifications which fire when video playback is completed.

Nothing is provided through UserInfo.

- (NSString* const) OOOoyalaPlayerPlayStartedNotification

The name used for notifications when video playback starts.

Nothing is provided through UserInfo.

- (NSString* const) OOOoyalaPlayerSeekCompletedNotification

The name used for notifications which fire when seek is completed.

UserInfo is a dictionary with a key "newState" with a value of a OOSeekInfo object. The seekStartTime of the object is not set for this notification.

See also
OOSeekInfo
- (NSString* const) OOOoyalaPlayerSeekStartedNotification

The name used for notifications which fire when seek is initialized.

UserInfo is a dictionary with a key "newState" with a value of a OOSeekInfo object.

See also
OOSeekInfo
- (NSString* const) OOOoyalaPlayerSsaiAdsMetadataReceivedNotification

Notification when received the ads metadata for SSAI.

- (NSString* const) OOOoyalaPlayerSsaiPlaySingleAdNotification

Notification when an ssai ad break has started.

- (NSString* const) OOOoyalaPlayerSsaiSingleAdPlayedNotification

Notification when an SSAI ad break has ended.

- (NSString* const) OOOoyalaPlayerStateChangedNotification

The name used for notifications when the player's state changes.

UserInfo is a dictionary with a key "newState" with a value of OOOoyalaPlayerState.

- (NSString* const) OOOoyalaPlayerSwitchSceneNotification

Notification when pressed switch between stereo and mono.

No additional data provided.

- (NSString* const) OOOoyalaPlayerTimeChangedNotification

The name used for notifications when playhead time changes.

Nothing is provided through UserInfo. You can get the time with OOoyalaPlayer.playheadTime

See also
- playheadTime (OOOoyalaPlayer(Playback))
- (NSString* const) OOOoyalaPlayerVideoHasVRContent

Notification when we handle vr metatag.

UserInfo contains bool value "vrContent". YES if video is 360 otherwise NO

- (NSString* const) OOOoyalaVRPlayerDidConfigured

Notification when VR player did configured.

No additional data provided.

Property Documentation

- (OOOoyalaPlayerActionAtEnd) actionAtEnd
readwritenonatomicassign

the OOOoyalaPlayerActionAtEnd to perform when the current item finishes playing.

- (BOOL) adsSeekable
readwritenonatomicassign

Whether or not the Ads that OOOoyalaPlayer plays are seekable.

- (BOOL) allowsExternalPlayback
readwritenonatomicassign
- (OOAssetLoaderDelegate*) assetLoaderDelegate
readwritenonatomicassign

This property can be used to pass Custom Implementation of AVAssetResourceLoaderDelegate from AVFoundation.

Note : This only for special purposes. Not recommend to use this property often. When this property is in use, you CAN NOT use FairPlay.

- (BOOL) audioOnly
readnonatomicassign

Provided by category OOOoyalaPlayer(Playback).

- (OOAudioSession*) audioSession
readwritenonatomicassign
- (NSString*) authToken
readnonatomicassign

The Auth Token provided by Ooyala Authorization, when using Ooyala Player Token.

- (NSString*) closedCaptionsLanguage
readwritenonatomicassign

the current closed captions language, or nil to hide closed captions.

- (BOOL) closedCaptionsTrackAvailable
readnonatomicassign
- (NSString*) contentSessionId
readnonatomicassign

A Session ID that is created on the set of a new piece of content (i.e setEmbedCode).

Persists until a new piece of content is set. Can be null if no video was set

- (OOVideo*) currentItem
readnonatomicassign

The OOOoyalaPlayer's currently playing OOVideo.

- (OOCurrentItemChangedCallback) currentItemChangedCallback
readwritenonatomicassign

A callback that will be called every time the current item is changed.

- (NSString*) customDrmData
readwritenonatomicassign
- (OOOoyalaPlayerDesiredState) desiredState
readnonatomicassign

Gets the user's current desired state.

Returns
a string containing the current state
- (OOOoyalaError*) error
readnonatomicassign

The OOOoyalaPlayer's current error if it exists.

- (BOOL) externalPlaybackActive
readnonatomicassign
- (BOOL) isAudioOnlyStreamPlaying
readnonatomicassign

Get whether the player is playing the audio only stream in an m3u8.

- (OOManagedAdsPlugin*) managedAdsPlugin
readnonatomicassign

Get the managedAdsPlugin that manages OOOoyalaAdSpots and OOVASTAdSpots.

- (NSDictionary*) metadata
readnonatomicassign

The OOOoyalaPlayer's content metadata for currently loaded content.

- (OOUIProgressSliderMode) normalSliderMode
readwritenonatomicassign
- (OOOptions*) options
readnonatomicassign

Get the options.

- (NSString*) pcode
readnonatomicassign
- (BOOL) pipActivated
readnonatomicassign

Provided by category OOOoyalaPlayer(Playback).

- (float) playbackRate
readwritenonatomicassign

When external playback is enabled, this will share the video view to the external screen only, instead of mirroring the device.

the rate of playback. 1 is the normal speed. Set to .5 for half speed, 2 for double speed, etc.

- (NSString*) playerSessionId
readnonatomicassign

A Session ID that is created at the initialization of OoyalaPlayer.

Persists for the life of the OoyalaPlayer

- (OOContentItem*) rootItem
readnonatomicassign

The OOOoyalaPlayer's embedded content (OOVideo, OOChannel, or OOChannelSet)

- (BOOL) seekable
readwritenonatomicassign

Whether or not the Videos that OOOoyalaPlayer plays are seekable.

- (OOSeekStyle) seekStyle
readnonatomicassign
- (OOOoyalaPlayerSessionIDManager*) sessionIDManager
readnonatomicassign
- (OOStreamPlayerMapping*) streamPlayerMapping
readnonatomicassign
- (BOOL) supportsVideoGravityButton
readnonatomicassign
- (NSString*) userAgent
readwritenonatomicassign

This property can be used to set the User-Agent for manifest requests served by AVPlayer.

This will not change User-Agent for player api requests. Note : [player setUserAgent:"

"] should be called after initializing player but before calling [player setEmbedCode:] method.

- (BOOL) usesExternalPlaybackWhileExternalScreenIsActive
readwritenonatomicassign
- (OOOoyalaPlayerVideoGravity) videoGravity
readwritenonatomicassign
- (UIView*) view
readnonatomicassign

the view associated with the player

- (float) volume
readwritenonatomicassign

The volume of the OoyalaPlayer, relative to the device's volume setting.

For example, if volume is 1.0 (default), the playback volume would be as loud as the device's volume. The volume set here will affect Content, Ooyala, Pulse, and VAST ad playback. It will not affect other ad managers. This property can be changed at any point after the OoyalaPlayer is initialized


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