Public properties
Properties:
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
source |
Object | Source for the content to be played. Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
autoplay |
Boolean | Whether to autoplay the video. Default value is false. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
volume |
Number | The volume for playback (0-1). |
|||||||||||||||||||||||||||||||||||||||||||||||||||
muted |
Boolean | Whether the player is muted or not. Default value is false. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
maxBitrate |
Number | User sets the maximum bitrate to be capped. To reset the capping we need to pass NULL or Infinity as maxBitrate. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
progressUpdateInterval |
Number | The update period for the progress event in milliseconds. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
statisticsConfig |
Object | The statistics Configuration. An Object with statisticsTypes and statisticsUpdateInterval as its properties. Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
onLoadStart |
function | Get called when the video starts loading. Application needs to set handler to receive and handle information from the event. SeeOTVPlayer.props.onLoadStart |
|||||||||||||||||||||||||||||||||||||||||||||||||||
onLoad |
function | Get called when the video has finished loading. Application needs to set handler to receive and handle information from the event. SeeOTVPlayer.props.onLoad |
|||||||||||||||||||||||||||||||||||||||||||||||||||
onTracksChanged |
function | Called when a change has occurred to the player's tracks (i.e. addition, removal or select/deselect a track). Application needs to set handler to receive and handle information from the event. SeeOTVPlayer.props.onTracksChanged |
|||||||||||||||||||||||||||||||||||||||||||||||||||
onTextTrackSelected |
function | Called when a change to the text track that has been selected (i.e. user select/deselect a track). Application needs to set handler to receive and handle information from the event. SeeOTVPlayer.props.onTextTrackSelected |
|||||||||||||||||||||||||||||||||||||||||||||||||||
onAudioTrackSelected |
function | Called when a change to the audio track that has been selected (i.e. user select/deselect a track). Application needs to set handler to receive and handle information from the event. SeeOTVPlayer.props.onAudioTrackSelected |
|||||||||||||||||||||||||||||||||||||||||||||||||||
onProgress |
function | Called when the video playback progresses. Application needs to set handler to receive and handle information from the event. SeeOTVPlayer.props.onProgress |
|||||||||||||||||||||||||||||||||||||||||||||||||||
onSeek |
function | Called when the player has completed a seek operation. Application needs to set handler to receive and handle information from the event. SeeOTVPlayer.props.onSeek |
|||||||||||||||||||||||||||||||||||||||||||||||||||
onEnd |
function | Called when the player has completed playback of the video to its end. Application needs to set handler to receive and handle information from the event. SeeOTVPlayer.props.onEnd |
|||||||||||||||||||||||||||||||||||||||||||||||||||
onPaused |
function | Called when the player has paused playback of the video. Application needs to set handler to receive and handle the event. SeeOTVPlayer.props.onPaused |
|||||||||||||||||||||||||||||||||||||||||||||||||||
onPlay |
function | Called when the player starts or resumes playback of the video. Application needs to set handler to receive and handle the event. SeeOTVPlayer.props.onPlay. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
onError |
function | Called when OTVPlayerView has encountered an error it will return an errorType, error and error message. Application needs to set handler to receive and handle information from the event. SeeOTVPlayer.props.onError |
|||||||||||||||||||||||||||||||||||||||||||||||||||
onWaiting |
function | Called when playback has stalled. Application needs to set handler to receive and handle the event. SeeOTVPlayer.props.onWaiting |
|||||||||||||||||||||||||||||||||||||||||||||||||||
onStopped |
function | Called when the player stop playback of the video, after stop api call. Application needs to set handler to receive and handle the event. SeeOTVPlayer.props.onStopped |
|||||||||||||||||||||||||||||||||||||||||||||||||||
onStatisticsUpdate |
function | Gets called periodically to display the stats. Application needs to set handler to receive and handle information from the event. SeeOTVPlayer.props.onStatisticsUpdate |
Type Definitions
-
OTVPlayer.props.onAudioTrackSelected(event)
Callback set by application to handle event onAudioTrackSelected.
-
Name Type Description eventObject The event object.
Name Type Description indexNumber The native index of the audio track.
-
OTVPlayer.props.onBitratesAvailable(event)
Callback set by application to handle event onBitratesAvailable.
-
If provided by the App, will be triggered by the RN Plugin once bitrates information is available for a currently played content.
Name Type Description eventObject The event object.
Name Type Description bitratesArray.<Number> Array of bitrates (in bits per second) for the currently selected content.
-
OTVPlayer.props.onDownloadResChanged(event)
Callback given by application to the player for getting the event onDownloadResChanged.
-
Name Type Description eventObject The event object.
Name Type Description widthnumber the width, in pixels, to cap the content.
heightnumber the height, in pixels, to cap the content.
-
OTVPlayer.props.onEnd(event)
Callback set by application to handle event onEnd.
-
Name Type Description eventObject The event object. This will be empty.
-
OTVPlayer.props.onError(event)
Callback set by application to handle event onError.
-
Name Type Description eventObject The event object.
Name Type Description codenumber Refer
ERROR_TABLEfor error codes.nativeErrorObject Platform specific error object
-
OTVPlayer.props.onLoad(event)
Callback set by application to handle event onLoad.
-
Name Type Description eventObject The event object.
Name Type Description durationNumber The duration of the content in seconds.
canPlayReverseBoolean A Boolean value that indicates whether the item can be played in reverse.
Only for iOS, and the value is true for Android.canPlayFastForwardBoolean A Boolean value that indicates whether the item can be fast forwarded.
Only for iOS, and the value is true for Android.canPlaySlowForwardBoolean A Boolean value that indicates whether the item can be played slower than normal.
Only for iOS, and the value is true for Android.canPlaySlowReverseBoolean A Boolean value that indicates whether the item can be played slowly backward.
Only for iOS, and the value is true for Android.canStepBackwardBoolean A Boolean value that indicates whether the item supports stepping backward.
Only for iOS, and the value is true for Android.canStepForwardBoolean A Boolean value that indicates whether the item supports stepping forward.
Only for iOS, and the value is true for Android.naturalSizeObject Indicates the natural dimensions of the media data referenced by the track.
Name Type Description widthNumber The width of the media data.
heightNumber The height of the media data.
orientationString "landscape" or "portrait" to indicate the orientation.
-
OTVPlayer.props.onLoadStart(event)
Callback set by application to handle the event onLoadStart.
-
Name Type Description eventObject The event object.
Name Type Description srcString The Source URI of the media data.
typeString The Source type.
-
OTVPlayer.props.onPaused(event)
Callback set by application to handle event onPaused.
-
Name Type Description eventObject The event object. This will be empty.
- See:
-
OTVPlayer.props.onPlay(event)
Callback set by application to handle event onPlay.
-
Name Type Description eventObject The event object. This will be empty.
- See:
-
OTVPlayer.props.onPlaying(event)
Callback set by application to handle event onPlaying.
-
Name Type Description eventObject The event object. This will be empty.
-
OTVPlayer.props.onProgress(event)
Callback set by application to handle event onProgress.
-
Name Type Description eventObject The event object.
Name Type Description currentTimeNumber The current time from the content of the playback in seconds.
- For VOD content, the value is the current playback time between 0 and total duration (
event.seekableDuration). - For LIVE content, the value is the program date time of the current playback.
currentPositionNumber The current position of the playback in seconds.
playableDurationNumber The duration of the media data.
seekableDurationNumber The seekable duration of the media data.
- For VOD content, the value is equal to
event.playableDuration. - For LIVE content, the value is equal to the seekable windows size in seconds.
- For VOD content, the value is the current playback time between 0 and total duration (
-
OTVPlayer.props.onSeek(event)
Callback set by application to handle event onSeek.
-
Name Type Description eventObject The event object.
Name Type Description currentPositionNumber The current position of the playback in seconds.
seekPositionNumber The seek position value set from props.seek.position.
- See:
-
OTVPlayer.props.onSelectedBitrateChanged(event)
Callback set by application to handle event onSelectedBitrateChanged.
-
If provided by the App, will be triggered by the RN Plugin on every change of bitrate at which the current content is running.
This is the actual rate at which content is running (depending on currently available bandwidth on the Client).Name Type Description eventObject The event object.
Name Type Description bitrateNumber bitrate in bits per second.
-
OTVPlayer.props.onStatisticsUpdate(event)
Callback set by application to handle the event onStatisticsUpdate and display required statistics.
-
Name Type Description eventObject The event object.
Name Type Description framesPerSecondNominalString The number of frames per second nominal.
framesPerSecondString The number of frames per second.
frameDropsString The number of frame drops.
frameDropsPerSecondString The number of frame drops per second.
availableBitratesString The available bitrates while playback.
selectedBitrateString The selected bitrate from the available bitrate.
bytesDownloadedString The number of bytes downloaded.
downloadBitrateString The download bitrate.
downloadBitrateAverageString The average download bitrate.
streamBitrateString The stream bitrate.
resolutionString The resolution of the content.
-
OTVPlayer.props.onStopped(event)
Callback set by application to handle event onStopped.
-
Name Type Description eventObject The event object. This will be empty.
- See:
-
OTVPlayer.props.onTextTrackSelected(event)
Callback set by application to handle event onTextTrackSelected.
-
Name Type Description eventObject The event object.
Name Type Description indexNumber The native index of the text track.
-
OTVPlayer.props.onTracksChanged(event)
Callback set by application to handle event onTracksChanged.
-
Name Type Description eventObject The event object.
Name Type Description audioTracksArray.<Object> Array of available audio tracks.
audioTracks[].titleString The title of the track.
audioTracks[].languageString The language of the track.
audioTracks[].encodeTypeNumber Refer to
AUDIO_ENCODING_TYPE.textTracksArray.<Object> Array of available text tracks.
textTracks[].titleString The title of the track.
textTracks[].languageString The language of the track.
textTracks[].encodeTypeNumber Refer to
TEXT_ENCODING_TYPE.textTracks[].characteristicsArray.<String> Characteristics of the track.
-
OTVPlayer.props.onWaiting(event)
Callback set by application to handle event onWaiting.
-
Name Type Description eventObject The event object. This will be empty.