Dealing with iOS Mobile Errors

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

Note: When dealing with iOS Mobile Errors, you also need to remember to provide and display useful error messages for your app to your users.

extern NSString *const OOOoyalaPlayerErrorNotification ; 
/** Fires when an error occurs */
   
After an error notification is received, to determine the exact error, read the OOOoyalaError property of the player object:
/** Returns current error if it exists */
@property(readonly, nonatomic, strong) OOOoyalaError *error;      
   

The errors are enumerated in the header file Headers/OOOoyalaError.h and described here:

Table 1. Mobile SDK for iOS Error Codes
Error Description
OOOoyalaErrorCodeAuthorizationFailed Access authorization has failed.
OOOoyalaErrorCodeAuthorizationInvalid A provided authorization response is invalid.
OOOoyalaErrorCodeHeartbeatFailed The heartbeat confirmation has failed.
OOOoyalaErrorCodeContentTreeInvalid The content tree response is invalid.
OOOoyalaErrorCodeAuthorizationSignatureInvalid The signature of the Authorization Response is invalid.
OOOoyalaErrorCodeContentTreeNextFailed The content tree next event failed.
OOOoyalaErrorCodePlaybackFailed The AVPlayer failed.
OOOoyalaErrorCodeAssetNotEncodedForIOS The asset is not encoded for iOS.
OOOoyalaErrorCodeInternalIOS This is an internal iOS Error. Check the error property.
OOOoyalaErrorCodeMetadataInvalid The metadata response is invalid.
OOOoyalaErrorCodeDeviceInvalidAuthToken This error occurs during DRM Rights Acquisition and indicates an invalid rights server token.
OOOoyalaErrorCodeDeviceLimitReached This error code occurs during DRM Rights Acquisition and indicates a server report that the device limit is reached.
OOOoyalaErrorCodeDeviceBindingFailed This error code occurs during DRM Rights Acquisition and indicates a server report that a device binding failed.
OOOoyalaErrorCodeDeviceIdTooLong This error occurs during DRM Rights Acquisition and indicates a server report that the device id is too long.
OOOoyalaErrorCodeDeviceGenericDrmError This error occurs during DRM Rights Acquisition and indicates an unknown error has occurred during the DRM workflow.
OOOoyalaErrorCodeDrmDownloadFailedError This error occurs during DRM Rights Acquisition and indicates that a required file failed to download.
OOOoyalaErrorCodeDrmPersonalizationFailedError This error occurs during DRM Rights Acquisition and indicates that device personalization failed to complete.
OOOoyalaErrorCodeDrmAcquireRightsFailedError This error occurs during DRM Rights Acquisition and indicates that asset rights acquisition failed.
OOOoyalaErrorCodeDiscoveryInvalidParameter The expected discovery parameters were not provided.
OOOoyalaErrorCodeDiscoveryNetworkError The Discovery response was not received due to network error.
OOOoyalaErrorCodeDiscoveryFailedResponse The Discovery response was received, but an error occurred on the server side.

Was this article helpful?