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. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
progressUpdateInterval |
Number | The update period for the progress event in milliseconds. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
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 encouted 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. This event currently works on Web platform only. Application needs to set handler to receive and handle the event. SeeOTVPlayer.props.onStopped |
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.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 forwared.
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. Not implemented.
-
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 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 equel to the seekable windows size in seconds.
- For VOD content, the value is equal to
-
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 this.props.seek.position.
- See:
-
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.
textTracksArray.<Object> Array of available text traks.
textTracks[].indexNumber The native index of the text track.
textTracks[].titleString The title of the track.
textTracks[].languageString The language of the track.
textTracks[].enabledBoolean Flag to indicate if this is the active track
Properties:
Name Type Description event.audioTracks[].indexNumber The native index of the audio track.
event.audioTracks[].titleString The title of the track.
event.audioTracks[].languageString The language of the track.
event.audioTracks[].enabledBoolean Flag to indicate if this is the active track
-
OTVPlayer.props.onWaiting(event)
Callback set by application to handle event onWaiting.
-
Name Type Description eventObject The event object. This will be empty.