All UPI events are defined in a single interface - IOTVUPIEventListener
. The application must implement an instance of this interface and pass over the instance's reference to the UPI Player to receive the various events.
Passing the instance can be done in two different ways:
Using the OTVUPIPlayerFactory
class, create the player with the listener instance using the class's method
JAVA
public static IOTVUPIPlayer createPlayer(
@NonNull Context xContext,
@NonNull OTVUPISource xSrc,
@Nullable IOTVUPIEventListener xEventListener)
Passing the listener to the already-created player
JAVA
player.setEventListener(xEventListener);
onError event
The onError event is probably the most important callback defined in the IOTVUPIEventListener
interface. It is called when an error occurs to notify the listener of an error and its nature. The relevant method prototypes for error handling are listed here:
JAVA
void onError(@NonNull OTVUPIError xError)
int OTVUPIError.getCode()
OTVUPIError.Details OTVUPIError.getDetails()
int OTVUPIError.Details.getWhat()
int OTVUPIError.Details.getExtra()
@NonNull String OTVUPIError.getMessage()
Parameter | Type | Description |
---|
code | Number | The unique error code |
details | Object | The error details |
Android SDK-specific errors |
what | Number |
|
extra | Number |
|
message | String |
|
Error code | Category | Description |
---|
1000 | UNKNOWN | Any unknown error |
1001-1999 | SOURCE | Errors in the source: - 1001 - Source is not supported (e.g. source URI is not supported, MIME from HEAD request is not correct etc.)
- 1002 - Source is not found (e.g. source download error)
- 1003 - Manifest errors such as HLS playlist errors, DASH MPD errors (incorrect/invalid manifest)
|
2001-2999 | MEDIA | Errors in parsing or processing audio or video or subtitle streams: - 2001 - Audio/Video/Subtitle demux/decode errors which cause playback failures
- 2002 - Subtitle parsing errors which cause playback failures
- 2003 - Invalid Volume Level
- 2004 - No Text Track available
- 2005 - Invalid stream format
- 2100 - Unspecified/Unknown media error
|
3001-3999 | NETWORK | Errors from the network stack: - 3001 - No Network connections
- 3002 - Response is timed out for any network request.
- 3003 - HTTP generic errors (e.g. 40x, 50x, etc.)
|
4001-4999 | OFFLINECONTENT | Errors for offline playback: - 4001 - Offline content cannot be found
- 4002 - Offline content invalid license
|
5001-5999 | DRM | Errors related to DRM: - 5001 - DRM Provisioning errors
- 5002 - DRM type not supported
- 5003 - Fail to create DRM instance
- 5004 - License expired
- 5005 - License data error
- 5006 - License request timeout
- 5007 - License response error
- 5008 - Content decryption error
- 5009 - Non-specified DRM error
- 5020 - SSP-specific error
- 5021 - CONNECT-specific error
- 5022 - Content token fetching error
|
6001-6999 | SSM | Errors related to SSM: - 6001 - Setup error
- 6002 - Teardown error
- 6003 - License renewal error due to a missing/wrong heartbeat in seconds or the license server has not received the renewal request after the licence expiry.
|
7001-7999 | PLAYER | Miscellaneous errors from the player: - Other Native player engine errors
- 7001- Non-specific native player error
- 7002 - Invalid progressUpdateInterval
- 7003 - Invalid (audio / text) track index / Text track already disabled
- 7004 - Out of bound seek request
- 7010 - RN Player internal error
|
8001-8999 | BROADCAST CHANNEL | Errors in playing broadcast services: - 8001 - Broadcast channel is not supported.
- 8002 - Broadcast channel has no signal or lost signal
- 8003 - Channel tuner lock is unavailable to tune to a new channel i.e. tuner is locked in another channel.
- 8004 - Channel is under parental lock.
- 8005 - Key module is missing in the channel.
- 8006 - Unknown triplet.
- 8007 - Channel switch interrupted.
- 8008 - Channel switch not allowed since there is a recording going on in another channel/Tuner not available.
- 8009 - Unresolved/Incorrect channel URI
- 8010 - Insufficient bandwidth error
- 8011 - Next or previous channel list not available/ EPG info is missing.
- 8012 - Insufficient resource error
- 8013 - Channel not found in TS Stream
- 8014 - No channel List
- 8015 - Object is empty
- 8016 - Invalid broadcast URI.
- 8017 - OIPF unsupported.
- 8018 - Video object creation failed
- 8019 - Configuration object creation failed.
- 8100 - Unidentified broadcast channel error
|