Android OpenTV Player SDK
5.35.0.1710620932
|
Interface definition of callbacks when events occur.
Classes | |
class | NaturalSize |
Media size dimensions in onLoad events. More... | |
class | TrackInfo |
Track information for onTracksChanged events. More... | |
Public Member Functions | |
void | onLoadStart (@NonNull String xSrc, @NonNull String xType) |
Gets called when the Media url starts to load. More... | |
void | onLoad (int xDurationMs, int xTrickModeFlags, @NonNull NaturalSize xNaturalSize) |
Gets called when the Media url is loaded successfully. More... | |
void | onTracksChanged (@NonNull List< TrackInfo > xTextTrackList, @NonNull List< TrackInfo > xAudioTrackList, @NonNull List< TrackInfo > xVideoTrackList) |
Gets called when the media content is loaded and tracks are found or updated from the content. More... | |
void | onProgress (long xCurrentTimeMs, int xCurrentPositionMs, int xPlayableDurationMs, int xSeekableDurationMs) |
Gets called periodically to show the progress of playback. More... | |
void | onStatisticsUpdate (OTVUPIStatistics xStatistics, int xEnabledStatistics) |
Gets called periodically to present statistics. More... | |
void | onSeek (int xCurrentPositionMs, int xSeekPositionMs) |
Gets called when the seek completes. More... | |
void | onEnd () |
Gets called when the media reaches the end of playback. More... | |
void | onWaiting () |
Gets called when the player has not enough data to continue playback, but it may recover in a short time. More... | |
void | onPlaying () |
Gets called when the player has enough data for continuing playback, and recovered from onWaiting state. More... | |
void | onPaused () |
Gets called when the playback is paused. More... | |
void | onPlay () |
Gets called when the playback is playing. More... | |
void | onStopped () |
Gets called when the playback is stopped. More... | |
void | onVideoTrackSelected (int xIndex) |
Gets called when the video track selection takes effect. More... | |
void | onAudioTrackSelected (int xIndex) |
Gets called when the audio track selection takes effect. More... | |
void | onTextTrackSelected (int xIndex) |
Gets called when the text track selection takes effect. More... | |
void | onError (@NonNull OTVUPIError xError) |
Gets called on playback error. More... | |
void | onBitratesAvailable (@Nullable int[] xBitrates) |
Gets called to provide details of content's available bitrates. More... | |
void | onSelectedBitrateChanged (int xBitrate) |
Gets called on change in selected content's bitrate. More... | |
void | onDownloadResolutionChanged (Pair< Integer, Integer > xResolution) |
Gets called on change in selected content's resolution. More... | |
void | onThumbnailAvailable () |
Indicates the stream being played contains preview thumbnails. More... | |
void | onThumbnailNotAvailable () |
Indicates the stream being played does not contain preview thumbnails. More... | |
void | onOfflineStreamNotAvailable () |
Indicates the offline stream is not available for playback The event onOfflineStreamNotAvailable will be triggered as soon as the player detects the offline stream does not exist. More... | |
Public Attributes | |
int | ONLOAD_FLAG_CAN_PLAY_REVERSE = 0x01 |
Flag for onLoad onLoad} Indicates whether the stream can play reverse. More... | |
int | ONLOAD_FLAG_CAN_PLAY_FAST_FORWARD = 0x02 |
Flag for onLoad onLoad} Indicates whether the stream can play forward. More... | |
int | ONLOAD_FLAG_CAN_PLAY_SLOW_FORWARD = 0x04 |
Flag for onLoad onLoad} Indicates whether the stream can play slow forward. More... | |
int | ONLOAD_FLAG_CAN_PLAY_SLOW_REVERSE = 0x08 |
Flag for onLoad onLoad} Indicates whether the stream can play slow reverse. More... | |
int | ONLOAD_FLAG_CAN_STEP_BACKWARD = 0x10 |
Flag for onLoad onLoad} Indicates whether the stream can step backward. More... | |
int | ONLOAD_FLAG_CAN_STEP_FORWARD = 0x20 |
Flag for onLoad onLoad} Indicates whether the stream can step forward. More... | |
void onAudioTrackSelected | ( | int | xIndex | ) |
Gets called when the audio track selection takes effect.
xIndex | the index of audio track in the audio tracks array. |
Implemented in OTVUPIEventListener.
void onBitratesAvailable | ( | @Nullable int[] | xBitrates | ) |
Gets called to provide details of content's available bitrates.
xBitrates | array of bitrates (each bitrate in bits per second) |
void onDownloadResolutionChanged | ( | Pair< Integer, Integer > | xResolution | ) |
Gets called on change in selected content's resolution.
xResolution | resolution (width, height) |
Implemented in OTVUPIEventListener.
void onEnd | ( | ) |
Gets called when the media reaches the end of playback.
Implemented in OTVUPIEventListener.
void onError | ( | @NonNull OTVUPIError | xError | ) |
Gets called on playback error.
xError | OTVUPIError object |
Implemented in OTVUPIEventListener.
void onLoad | ( | int | xDurationMs, |
int | xTrickModeFlags, | ||
@NonNull NaturalSize | xNaturalSize | ||
) |
Gets called when the Media url is loaded successfully.
xDurationMs | the total duration of the media content in ms |
xTrickModeFlags | a bitmapped integer indicating trick mode support
|
xNaturalSize | indicates the natural dimensions of the media data referenced by the track |
Implemented in OTVUPIEventListener.
void onLoadStart | ( | @NonNull String | xSrc, |
@NonNull String | xType | ||
) |
Gets called when the Media url starts to load.
xSrc | the address of the media content |
xType | is the MIME-type of the media content |
Implemented in OTVUPIEventListener.
void onOfflineStreamNotAvailable | ( | ) |
Indicates the offline stream is not available for playback The event onOfflineStreamNotAvailable will be triggered as soon as the player detects the offline stream does not exist.
Implemented in OTVUPIEventListener.
void onPaused | ( | ) |
Gets called when the playback is paused.
Implemented in OTVUPIEventListener.
void onPlay | ( | ) |
Gets called when the playback is playing.
Implemented in OTVUPIEventListener.
void onPlaying | ( | ) |
Gets called when the player has enough data for continuing playback, and recovered from onWaiting state.
Implemented in OTVUPIEventListener.
void onProgress | ( | long | xCurrentTimeMs, |
int | xCurrentPositionMs, | ||
int | xPlayableDurationMs, | ||
int | xSeekableDurationMs | ||
) |
Gets called periodically to show the progress of playback.
Default period is 250ms, but can be set in setProgressUpdateInterval.
xCurrentTimeMs | the time from the content of the playback in ms
|
xCurrentPositionMs | the current position of the playback in ms
|
xPlayableDurationMs | the duration of the currently buffered media data in ms |
xSeekableDurationMs | the seekable duration of the media data in ms
|
Implemented in OTVUPIEventListener.
void onSeek | ( | int | xCurrentPositionMs, |
int | xSeekPositionMs | ||
) |
Gets called when the seek completes.
xCurrentPositionMs | the current position after seek completes in ms |
xSeekPositionMs | the requested position in ms |
Implemented in OTVUPIEventListener.
void onSelectedBitrateChanged | ( | int | xBitrate | ) |
Gets called on change in selected content's bitrate.
xBitrate | bitrate (in bits per second) |
Implemented in OTVUPIEventListener.
void onStatisticsUpdate | ( | OTVUPIStatistics | xStatistics, |
int | xEnabledStatistics | ||
) |
Gets called periodically to present statistics.
Default period is 5000ms, but can be set in IOTVUPIPlayer#setStatisticsConfig(OTVUPIStatisticsConfig).
xStatistics | the structure containing all statistics |
xEnabledStatistics | A bitmap representing which statistics are to be sent
|
Implemented in OTVUPIEventListener.
void onStopped | ( | ) |
Gets called when the playback is stopped.
Implemented in OTVUPIEventListener.
void onTextTrackSelected | ( | int | xIndex | ) |
Gets called when the text track selection takes effect.
xIndex | the index of text track in the text tracks array. |
Implemented in OTVUPIEventListener.
void onThumbnailAvailable | ( | ) |
Indicates the stream being played contains preview thumbnails.
The event onThumbnailAvailable will be triggered as soon as the player detects any existing compatible thumbnails in the source requested to be played. This is triggered only once for a new content request. This is required for the App to decide setting up of displayThumbnail
Implemented in OTVUPIEventListener.
void onThumbnailNotAvailable | ( | ) |
Indicates the stream being played does not contain preview thumbnails.
The event onThumbnailNotAvailable will be triggered as soon as the player detects no any existing compatible thumbnails in the source requested to be played. This is triggered only once for a new content request.
Implemented in OTVUPIEventListener.
void onTracksChanged | ( | @NonNull List< TrackInfo > | xTextTrackList, |
@NonNull List< TrackInfo > | xAudioTrackList, | ||
@NonNull List< TrackInfo > | xVideoTrackList | ||
) |
Gets called when the media content is loaded and tracks are found or updated from the content.
xTextTrackList | the list of text tracks (subtitles) |
xAudioTrackList | the list of audio tracks |
xVideoTrackList | he list of video tracks |
Implemented in OTVUPIEventListener.
void onVideoTrackSelected | ( | int | xIndex | ) |
Gets called when the video track selection takes effect.
xIndex | the index of video track in the video tracks array. |
Implemented in OTVUPIEventListener.
void onWaiting | ( | ) |
Gets called when the player has not enough data to continue playback, but it may recover in a short time.
Implemented in OTVUPIEventListener.
int ONLOAD_FLAG_CAN_PLAY_FAST_FORWARD = 0x02 |
Flag for onLoad onLoad} Indicates whether the stream can play forward.
int ONLOAD_FLAG_CAN_PLAY_REVERSE = 0x01 |
Flag for onLoad onLoad} Indicates whether the stream can play reverse.
int ONLOAD_FLAG_CAN_PLAY_SLOW_FORWARD = 0x04 |
Flag for onLoad onLoad} Indicates whether the stream can play slow forward.
int ONLOAD_FLAG_CAN_PLAY_SLOW_REVERSE = 0x08 |
Flag for onLoad onLoad} Indicates whether the stream can play slow reverse.
int ONLOAD_FLAG_CAN_STEP_BACKWARD = 0x10 |
Flag for onLoad onLoad} Indicates whether the stream can step backward.
int ONLOAD_FLAG_CAN_STEP_FORWARD = 0x20 |
Flag for onLoad onLoad} Indicates whether the stream can step forward.