Working with Events

You need to listen for event notifications on the player object.

First you need to set up notification objects, as shown below. Events are enumerated in the header file Headers/OOOoyalaPlayer.h with explanatory comments:
extern NSString const OOOoyalaPlayerTimeChangedNotification; 
/* Fires when the Playhead Time Changes */
extern NSString const OOOoyalaPlayerStateChangedNotification; 
/* Fires when the Player's State Changes */
extern NSString const OOOoyalaPlayerContentTreeReadyNotification; 
/* Fires when the content tree's metadata is ready and can be accessed */
extern NSString const OOOoyalaPlayerAuthorizationReadyNotification; 
/* Fires when the authorization status is ready and can be accessed */
extern NSString const OOOoyalaPlayerPlayStartedNotification; 
/* Fires when play starts */
extern NSString const OOOoyalaPlayerPlayCompletedNotification; 
/* Fires when play completes */
extern NSString const OOOoyalaPlayerCurrentItemChangedNotification; 
/* Fires when the current item changes */
extern NSString const OOOoyalaPlayerAdStartedNotification; 
/* Fires when an ad starts playing */
extern NSString const OOOoyalaPlayerAdCompletedNotification; 
/* Fires when an ad completes playing */
extern NSString const OOOoyalaPlayerAdSkippedNotification; 
/* Fires when an ad is skipped */
extern NSString const OOOoyalaPlayerErrorNotification; 
/* Fires when an error occurs */
extern NSString const OOOoyalaPlayerAdErrorNotification; 
/* Fires when an error occurs while trying to play an ad */
extern NSString const OOOoyalaPlayerMetadataReadyNotification; 
/* Fires when content metadata is ready to be accessed */

For an example, see Dealing with iOS Mobile Errors.

해당 내용이 도움 되었습니까?