Method Summary
|
getAudioStreamInfo
(
|
Returns information about a specified audio stream in the current media stream multiplex in the form of an audio stream info structure. |
| getCapabilities ( ) → capabilityMask |
Returns the capabilities present for the current session. |
| getError ( ) → error |
Returns the last error. This is typically called when state is changed to ToiMediaPlayerBase.STATE_FAILED. The result is undefined if no error has occurred. |
| getMediaBufferInfo ( ) → info |
Returns information about the current status of the media buffer. |
|
getParameters
(
|
Get the values of several parameters. |
| getPositionInfo ( ) → positionInfo |
Returns pace and position information for the current media session. |
| getPresentationInfo ( ) → info |
Returns the presentation information about current video and audio lock status. Audio locked means audio decoder is started, sample rate is locked and no sync loss. Video locked means video decoder is started and no sync loss. |
| getSessionId ( ) → id |
Returns the session identifier. This identifier can be used to open a session object with ToiMediaService#openSession. |
| getState ( ) → state |
Returns the current state of the media player instance. |
| getStreamInfo ( ) → streamInfo |
Returns information about the current stream in form of a stream info structure. The lists of audio and video streams provided as parts of this information can be used for further exploration using the ToiMediaPlayerBase#getAudioStreamInfo and ToiMediaPlayerBase#getVideoStreamInfo functions, respectively. |
|
getSubtitleStreamInfo
(
|
Returns information about a specified subtitle stream in the current media stream multiplex in the form of a subtitle stream info structure. |
|
getTeletextStreamInfo
(
|
Returns information about a specified teletext stream in the current media stream multiplex in the form of a teletext stream info structure. |
| getUrl ( ) → url |
Returns the URL for the media stream. |
|
getVideoStreamInfo
(
|
Returns information about a specified video stream in the current media stream multiplex in the form of a video stream info structure. |
| releaseInstance ( ) |
This function releases the resources used by this instance. When this function returns all observers has also been released. |
|
subscribeParameters
(
|
This function makes the application subscribe to updates of the given list of parameters. The first time an application subscribes to a specific parameter there will be an immediate ToiMediaPlayerParameterChangedEvent notification if the parameter already has a value. |
|
unsubscribeParameters
(
|
This function undoes the effect of a previous call to ToiMediaPlayerBase#subscribeParameters. Any parameters that has not been subscribed to will simply be ignored. |
Inherited Methods
|
addEventListener
(
|
This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners. |
|
removeEventListener
(
|
This method removes an event listener for a specific event. |
Type Definitions
- ACTIVE_FORMAT_4_3_CENTRE
- ACTIVE_FORMAT_4_3_SHOOT_AND_PROTECT_14_9_CENTRE
- ACTIVE_FORMAT_14_9_CENTRE
- ACTIVE_FORMAT_14_9_TOP
- ACTIVE_FORMAT_16_9_CENTRE
- ACTIVE_FORMAT_16_9_SHOOT_AND_PROTECT_4_3_CENTRE
- ACTIVE_FORMAT_16_9_SHOOT_AND_PROTECT_14_9_CENTRE
- ACTIVE_FORMAT_16_9_TOP
- ACTIVE_FORMAT_MORE_THAN_16_9_CENTRE
- ACTIVE_FORMAT_SAME_AS_CODED
- ACTIVE_FORMAT_UNKNOWN
|
Active format descriptor used to identify the active video format provided in the ToiMediaPlayerBase.ToiVideoStreamInfo structure. |
|
|
|
|
|
Aspect ratio identifier used to identify the video aspect ratio provided in the ToiMediaPlayerBase.ToiVideoStreamInfo structure. |
|
|
Audio type identifier used to identify the audio type provided in the ToiMediaPlayerBase.ToiAudioStreamInfo structure. |
|
|
The audio channel format specifies the number of channels and desired speaker setup. |
|
|
The audio channel mode specifies audio channel to speaker mappings. |
|
|
Media component identifier types used to set and get information about media components of a session. |
|
|
Enumeration of various sources that can cause an OnError event to occur. Typically, this can be a streamer element or similar low-level component. |
|
|
Media buffer types supported by the media player. Only one media buffer type is used for a given media player session |
|
|
Supported pace |
|
|
|
|
|
Receive DMF mode used for ARIB CC/CS |
|
|
Receive DMF mode used for ARIB CC/CS |
|
|
Enumeration of media player states. |
|
|
Subtitle format identifier used to identify the subtitle format provided in the ToiMediaPlayerBase.ToiSubtitleStreamInfo structure. |
|
|
Subtitle type identifier used to identify the subtitle type provided in the ToiMediaPlayerBase.ToiSubtitleStreamInfo structure. |
|
|
Defines the 3D video formats as specified in H.264 SEI frame packing message (see related ISO/IEC document for details). |
|
|
Defines the video scan mode |
|
Events
Methods
This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.
Inherited From:
Parameters:
-
Name Type Description typenumber The event type of the event to subscribe to.
listenerToiEventListener The JavaScript function that will receive events.
Throws:
-
ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the application calls addEventListener with the same combination of type and listener twice.
Returns information about a specified audio stream in the current media stream multiplex in the form of an audio stream info structure.
Parameters:
-
Name Type Description mediaComponentToiMediaPlayerBase.ToiComponentEntry The media component entry for which the stream info has to be retrieved.
Throws:
-
ToiSessionViolationException If the player is in ToiMediaPlayerBase.STATE_IDLE a session violation exception is raised.
ToiInvalidArgumentException If the mediaComponent given as argument does not identify an audio stream in the current stream multiplex, an invalid argument exception is raised.
ToiUnavailableException ToiUnavailableException is raised if the player is temporarily unavailable due to platform resource management.
Returns:
-
Type: ToiMediaPlayerBase.ToiAudioStreamInfo
Information about the specified audio stream.
Returns the capabilities present for the current session.
Throws:
-
ToiSessionViolationException If the player is in ToiMediaPlayerBase.STATE_IDLE a session violation exception is raised.
ToiUnavailableException ToiUnavailableException is raised if the player is temporarily unavailable due to platform resource management.
Returns:
-
Type: number
A bit mask describing the capabilities of the current session. The mask can include the following capabilities:
- Bit 0: ToiMediaPlayerBase.CAPABILITY_PAUSE
- Bit 1: ToiMediaPlayerBase.CAPABILITY_REWIND
- Bit 2: ToiMediaPlayerBase.CAPABILITY_FASTFORWARD
- Bit 3: ToiMediaPlayerBase.CAPABILITY_GETPOSITION
- Bit 4: ToiMediaPlayerBase.CAPABILITY_SETPOSITION
- Bit 5: ToiMediaPlayerBase.CAPABILITY_FREEZE
- Bit 6: ToiMediaPlayerBase.CAPABILITY_TIMESHIFT
- Bit 7: ToiMediaPlayerBase.CAPABILITY_MEDIA_BUFFER
Returns the last error. This is typically called when state is changed to ToiMediaPlayerBase.STATE_FAILED. The result is undefined if no error has occurred.
Returns:
-
Type: ToiMediaPlayerBase.ToiError
The error
Returns information about the current status of the media buffer.
Throws:
-
ToiSessionViolationException Raised if the player is in ToiMediaPlayerBase.STATE_IDLE.
ToiOperationNotSupportedException Raised if the session lacks the capability ToiMediaPlayerBase.CAPABILITY_MEDIA_BUFFER to get media buffer info.
ToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
Returns:
-
Type: ToiMediaPlayerBase.ToiMediaBufferInfo
The current media buffer information.
Get the values of several parameters.
See also:
Parameters:
-
Name Type Description namesArray.<ToiMediaSession.ToiParameterName> A list of parameter names.
Throws:
-
ToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
Returns:
-
Type: Array.<ToiMediaSession.ToiParameterInfo>
A list of the returned parameters. If a parameter does not exist (is not set), the status of the corresponding parameter is set to ToiMediaSession.STATUS_NO_PARAMETER.
Returns pace and position information for the current media session.
Throws:
-
ToiSessionViolationException If the player is in ToiMediaPlayerBase.STATE_IDLE a session violation exception is raised.
ToiOperationNotSupportedException If the session lacks the capability to get position, the operation not supported exception is raised.
ToiUnavailableException ToiUnavailableException is raised if the player is temporarily unavailable due to platform resource management.
Returns:
-
Type: ToiMediaPlayerBase.ToiPositionInfo
Position and pace information for the current media session.
Returns the presentation information about current video and audio lock status. Audio locked means audio decoder is started, sample rate is locked and no sync loss. Video locked means video decoder is started and no sync loss.
Technical Preview:
- This method is a TECHNICAL PREVIEW, it may change.
Throws:
-
ToiSessionViolationException If the player is in ToiMediaPlayerBase.STATE_IDLE a session violation exception is raised.
ToiUnavailableException ToiUnavailableException is raised if the player is temporarily unavailable due to platform resource management.
Returns:
-
Type: ToiMediaPlayerBase.ToiPresentationInfo
Information about the current lock status of video and audio.
Returns the session identifier. This identifier can be used to open a session object with ToiMediaService#openSession.
See also:
Throws:
-
ToiSessionViolationException If the player is in ToiMediaPlayerBase.STATE_IDLE a session violation exception is raised.
Returns:
-
Type: ToiMediaSession.ToiSessionId
The session identifier.
Returns the current state of the media player instance.
Returns:
-
Type: ToiMediaPlayerBase.ToiState
The current player state.
Returns information about the current stream in form of a stream info structure. The lists of audio and video streams provided as parts of this information can be used for further exploration using the ToiMediaPlayerBase#getAudioStreamInfo and ToiMediaPlayerBase#getVideoStreamInfo functions, respectively.
Throws:
-
ToiSessionViolationException If the player is in ToiMediaPlayerBase.STATE_IDLE a session violation exception is raised.
ToiUnavailableException ToiUnavailableException is raised if the player is temporarily unavailable due to platform resource management.
Returns:
-
Type: ToiMediaPlayerBase.ToiStreamInfo
Information about the current stream.
Returns information about a specified subtitle stream in the current media stream multiplex in the form of a subtitle stream info structure.
Parameters:
-
Name Type Description mediaComponentToiMediaPlayerBase.ToiComponentEntry The media component entry for which the stream info has to be retrieved.
Throws:
-
ToiSessionViolationException If the player is in ToiMediaPlayerBase.STATE_IDLE a session violation exception is raised.
ToiInvalidArgumentException If the streamId given as argument does not identify a subtitle stream in the current stream multiplex, an invalid argument exception is raised.
ToiUnavailableException ToiUnavailableException is raised if the player is temporarily unavailable due to platform resource management.
Returns:
-
Type: ToiMediaPlayerBase.ToiSubtitleStreamInfo
Information about the specified subtitle stream.
Returns information about a specified teletext stream in the current media stream multiplex in the form of a teletext stream info structure.
Parameters:
-
Name Type Description mediaComponentToiMediaPlayerBase.ToiComponentEntry The media component entry for which the stream info has to be retrieved.
Throws:
-
ToiSessionViolationException If the player is in ToiMediaPlayerBase.STATE_IDLE a session violation exception is raised.
ToiInvalidArgumentException If the mediaComponent given as argument does not identify a teletext stream in the current stream multiplex, an invalid argument exception is raised.
ToiUnavailableException ToiUnavailableException is raised if the player is temporarily unavailable due to platform resource management.
Returns:
-
Type: ToiMediaPlayerBase.ToiTeletextStreamInfo
Information about the specified teletext stream.
Returns the URL for the media stream.
Throws:
-
ToiSessionViolationException If the player is in ToiMediaPlayerBase.STATE_IDLE a session violation exception is raised.
Returns:
-
Type: string
The URL for the media stream.
Returns information about a specified video stream in the current media stream multiplex in the form of a video stream info structure.
Parameters:
-
Name Type Description mediaComponentToiMediaPlayerBase.ToiComponentEntry The media component entry for which the stream info has to be retrieved.
Throws:
-
ToiSessionViolationException If the player is in ToiMediaPlayerBase.STATE_IDLE a session violation exception is raised.
ToiInvalidArgumentException If the mediaComponent given as argument does not identify a video stream in the current stream multiplex, an invalid argument exception is raised.
ToiUnavailableException ToiUnavailableException is raised if the player is temporarily unavailable due to platform resource management.
Returns:
-
Type: ToiMediaPlayerBase.ToiVideoStreamInfo
Information about the specified video stream.
This function releases the resources used by this instance. When this function returns all observers has also been released.
This method removes an event listener for a specific event.
Inherited From:
Parameters:
-
Name Type Description typenumber The event type of the event to remove the listener from.
listenerToiEventListener The JavaScript function that was previously added as an event listener.
Throws:
-
ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the listener has not previously been added.
This function makes the application subscribe to updates of the given list of parameters. The first time an application subscribes to a specific parameter there will be an immediate ToiMediaPlayerParameterChangedEvent notification if the parameter already has a value.
See also:
Parameters:
-
Name Type Description eventListenerToiEventListener The eventListener that has been registered.
namesArray.<ToiMediaSession.ToiParameterName> The names of the parameters for which change the application wants to subscribe to.
Throws:
-
ToiInvalidArgumentException Raised if the address name is invalid or not registered.
ToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
This function undoes the effect of a previous call to ToiMediaPlayerBase#subscribeParameters. Any parameters that has not been subscribed to will simply be ignored.
See also:
Parameters:
-
Name Type Description eventListenerToiEventListener The eventListener that has been registered.
namesArray.<ToiMediaSession.ToiParameterName> The names of the parameters that the application is no longer interested in.
Throws:
-
ToiInvalidArgumentException Raised if the address name is invalid or not registered
ToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
Members
This is an Event identifier for ToiMediaPlayerCapabilitiesChangedEvent.
Tells the observer that the media player capabilities has changed. This may happen when time shifting is started and stopped.
This is an Event identifier for ToiMediaPlayerDataAvailableEvent.
Tells the observer when the status of stream data availability changes, e.g. when there is not enough data available for playback.
This is an Event identifier for ToiMediaPlayerMediaBufferStatusChangedEvent.
Tells the observer that the media buffer information has changed. This notification wil be triggered once a second if the session supports the capability ToiMediaPlayerBase.CAPABILITY_MEDIA_BUFFER&.
This is an Event identifier for ToiMediaPlayerParameterChangedEvent.
Tells the observer that the value has changed for one of the parameters that the observer is subscribing to.
This is an Event identifier for ToiMediaPlayerPositionStatusChangedEvent.
Gives the observer an up-to-date snapshot of the position in the stream, together with information about how the position changes. This event may be emitted at any time within a session, but generally it is emitted every time the pace changes and in regular intervals in-between.
This is an Event identifier for ToiMediaPlayerPresentationStatusChangedEvent.
Tells the observer when the video or audio locked status changes. Presentation information is also available through the function ToiMediaPlayerBase#getPresentationInfo.
This is an Event identifier for ToiMediaPlayerStateChangedEvent.
A call to this function tells the observer that the media player state has changed. The application is not notified this way about implicit state changes triggered by commands from the application itself. For example, assume the player is in ToiMediaPlayerBase.STATE_PLAYING. If the application calls ToiMediaPlayer#play with a pace greater than 1000 and the function returns without error, the player state has changed implicitly to ToiMediaPlayerBase.STATE_FASTFORWARDING but the application will not receive a call to ToiMediaPlayerStateChangedEvent for that particular state transition. However, other applications that have registered observers to the status interface will, assuming this particular player is in focus, receive calls to ToiMediaPlayerStateChangedEvent with state ToiMediaPlayerBase.STATE_FASTFORWARDING and reason ToiMediaService.REASON_COMMAND_FASTFORWARD.
Note that there is no timing constraint on these messages, and they may arrive late in certain situations. For example, the application may receive a call to this function about a state transition after the application has successfully called ToiMediaPlayer#close and thereby ended the session. This implies that the application should take calls to this function as indications to state transitions that has in fact happened, but it cannot say for certain when these state transitions occurred.
This is an Event identifier for ToiMediaPlayerStreamInfoChangedEvent.
Tells the observer that the media player has updated the available or active stream components or that the information on the stream components has changed. Information on the stream is available through the ToiMediaPlayerBase#getStreamInfo function. Information on the different type of stream components is available through the respecitve info functions in ToiMediaPlayerBase.
The active format descriptor is 4:3 centre.
The active format descriptor is 4:3 with shoot and protect 14:9 centre.
The active format descriptor is 14:9 centre.
The active format descriptor is 14:9 top.
The active format descriptor is 16:9 centre.
The active format descriptor is 16:9 with shoot and protect 4:3 centre.
The active format descriptor is 16:9 with shoot and protect 14:9 centre.
The active format descriptor is 16:9 top.
The active format descriptor is > 16:9 centre.
The active format descriptor is same as coded.
The active format descriptor is not known.
The aspect ratio is 4:3
The aspect ratio is 16:9
The aspect ratio is not known.
The audio is prepared for the hearing impaired.
The audio is prepared for normal audiance.
The audience type of the audio is not known.
The audio is prepared for the visually impaired.
Four audio channels. Three front and one back speakers.
Five audio channels. Three front and two back speakers.
Five audio channels. Three front and two back speakers. One low frequency effects channel (LFE). One subwoofer speaker.
Seven audio channels. Three front, two side and two back speakers. One low frequency effects channel (LFE). One subwoofer speaker.
Two content separate audio channels. Either one or two speakers.
One audio channel. One speaker.
Two audio channels. Two front speakers.
The audio channel format is not known.
The dual mono mode where the left channel is sent to both left and right front speaker outputs.
The dual mono mode where the left and right channels are mixed and sent to both left and right front speaker outputs
The dual mono mode where the right channel is sent to both left and right front speaker outputs.
The dual mono mode where the left channel is sent to the left front speaker output and the right channel is sent to the right front speaker output
The normal mode where each channel is sent to its speaker output.
When this bit is set the session accepts the ToiMediaPlayer.Play(PACE_PAUSE) command. Freeze is similar to pause, except that when resuming a frozen session it will continue from the current live position.
When this bit is set the session provides a position value which the client may read with ToiMediaPlayerBase#getPositionInfo and similar commands.
When this bit is set the session supports some type of media buffering and the client can get media buffer information using ToiMediaPlayerBase#getMediaBufferInfo.
When this bit is set the session accepts the ToiMediaPlayer.Play(PACE_PAUSE) command. When a paused session is resumed it will continue playing from the position where the pause occurred. This is similar to freeze.
When this bit is set the session accepts the position to be set ToiMediaPlayer#playFromPosition.
When this bit is set the session can perform timeshift buffering operations. It will not be unset when buffering or playing from the buffer as long as the session still supports timeshift operations.
Audio components have information of type ToiMediaPlayerBase.ToiAudioStreamInfo.
Denotes a regular subtitling component.
This is an ARIB specific type of subtitles.
Technical Preview:
This is an ARIB specific type of subtitles and used mainly for displaying alert messages on screen.
Technical Preview:
Teletext VBI component have information of type ToiMediaPlayerBase.ToiTeletextStreamInfo&.
Video components have information of type ToiMediaPlayerBase.ToiVideoStreamInfo.
Media download buffer Used
Timeshifter buffer Used
Predefined argument value for ToiMediaPlayer#play. Indicates that the player should play with a normal fast forward speed.
Predefined argument value for ToiMediaPlayer#play. Indicates that the player should be paused.
Predefined argument value for ToiMediaPlayer#play. Indicates that the player should play with normal speed.
Predefined argument value for ToiMediaPlayer#play. Indicates that the player should play with a normal rewind speed.
Predefined argument value for ToiMediaPlayer#playFromPosition. Indicates that the player should stop playing from the timeshift buffer and instead start playback of the live stream.
Automatic mode.
Non-automatic mode.
Select mode.
Special mode.
Automatic mode.
Non-automatic mode.
Select mode.
ToiMediaPlayerBase.SOURCE_INTERNAL - An internal failure occurred before an error code could be retrieved.
ToiMediaPlayerBase.SOURCE_UNKNOWN - An error of unknown type has occurred.
In ToiMediaPlayerBase.STATE_CONNECTING the media player has an active session and is in the process of establishing a connection to a media stream source. The media player will leave this state automatically and enter ToiMediaPlayerBase.STATE_PAUSED when it has successfully established the connection to the stream source. If the media player decides it cannot connect, it will enter ToiMediaPlayerBase.STATE_FAILED instead. If the application is not interested in knowing when the player has connected, it may call ToiMediaPlayer#play to set the player in ToiMediaPlayerBase.STATE_PLAYING directly. The application may also end the session by calling ToiMediaPlayer#close, which makes the player go to ToiMediaPlayerBase.STATE_IDLE.
In ToiMediaPlayerBase.STATE_FAILED the media player may or may not have a connection to a media source but the process of getting the stream from that source has failed in some fatal way. The media player will only leave ToiMediaPlayerBase.STATE_FAILED on a call by the application to ToiMediaPlayer#close.
In ToiMediaPlayerBase.STATE_FASTFORWARDING the media player has a connection to a media source and plays the stream from that source in forward direction at a pace above normal playback. For streams on which this operation cannot be performed, this state is not available. On a command from the application, the player will leave this state for one of the other playback states ToiMediaPlayerBase.STATE_PLAYING, ToiMediaPlayerBase.STATE_PAUSED, or ToiMediaPlayerBase.STATE_REWINDING. The application may also end the session by calling ToiMediaPlayer#close, which makes the player go to ToiMediaPlayerBase.STATE_IDLE. If an error occurs with the stream severe enough for the player to determine it cannot continue playback, the player will go to ToiMediaPlayerBase.STATE_FAILED.
In ToiMediaPlayerBase.STATE_IDLE there is no active session. The media player does not handle a stream, and consequently has no connection to a media stream source. All functions requiring a session will raise a ToiSessionViolationException in ToiMediaPlayerBase.STATE_IDLE. The media player will only leave ToiMediaPlayerBase.STATE_IDLE on a successful call to ToiMediaPlayer#open.
In ToiMediaPlayerBase.STATE_PAUSED the media player has a connection to a media source but playback is halted. On a command from the application, the player will leave this state for one of the other playback states ToiMediaPlayerBase.STATE_PLAYING, ToiMediaPlayerBase.STATE_FASTFORWARDING, or ToiMediaPlayerBase.STATE_REWINDING. The application may also end the session by calling ToiMediaPlayer#close, which makes the player go to ToiMediaPlayerBase.STATE_IDLE. If an error occurs with the stream severe enough for the player to determine it cannot continue playback, the player will go to ToiMediaPlayerBase.STATE_FAILED.
In ToiMediaPlayerBase.STATE_PLAYING the media player has a connection to a media source and plays the stream from that source in normal pace. On a command from the application, the player will leave this state for one of the other playback states ToiMediaPlayerBase.STATE_PAUSED, ToiMediaPlayerBase.STATE_FASTFORWARDING, or ToiMediaPlayerBase.STATE_REWINDING. The application may also end the session by calling ToiMediaPlayer#close, which makes the player go to ToiMediaPlayerBase.STATE_IDLE. If an error occurs with the stream severe enough for the player to determine it cannot continue playback, the player will go to ToiMediaPlayerBase.STATE_FAILED.
In ToiMediaPlayerBase.STATE_REWINDING the media player has a connection to a media source and plays the stream from that source in backward direction at a pace above normal playback. For streams on which this operation cannot be performed, this state is not available. On a command from the application, the player will leave this state for one of the other playback states ToiMediaPlayerBase.STATE_PLAYING, ToiMediaPlayerBase.STATE_PAUSED, or ToiMediaPlayerBase.STATE_FASTFORWARDING. The application may also end the session by calling ToiMediaPlayer#close, which makes the player go to ToiMediaPlayerBase.STATE_IDLE. If an error occurs with the stream severe enough for the player to determine it cannot continue playback, the player will go to ToiMediaPlayerBase.STATE_FAILED.
The subtitles are in ARIB format.
The subtitles are in DVB format.
The subtitles are in DVD format.
- Deprecated:
- Not supported.
The subtitles are designed for the hearing impaired.
The subtitles are designed for normal audience.
The subtitles are in SCTE-27 (Society of Cable Telecommunications Engineers) format.
- Deprecated:
- Not supported.
The subtitles are in SRT (SubRip Text) format.
The subtitles are in Teletext format.
The type of subtitles is not known.
The subtitles are in WEBVTT (Web Video Text Track) format.
The subtitles are in XSUB or XSUB plus format.
- Deprecated:
- Not supported.
Indicates cancel flag set.
Indicates SEI message absent.
Checkboard based arrangement.
Column based arrangement.
Reserved values.
Row based arrangement.
Side-by-side packing arrangement.
Temporal interleaving arrangement.
Top-bottom packing arrangement.
Interlaced video.
Progressive video.
Scan mode is unknown.
Audio stream data structure used to return audio stream information. Depending on the stream format some fields will be reported as unknown.
Struct fields
| Name | Description |
|---|---|
| audienceType | The audience type of the audio. Type: ToiMediaPlayerBase.ToiAudioAudienceType |
| channelFormat | Indicates the channel format. Type: ToiMediaPlayerBase.ToiAudioChannelFormat |
| channelMode | Indicates the current channel mode. Type: ToiMediaPlayerBase.ToiAudioChannelMode |
| componentTag | The audio component tag value. The value will be set to -1 if it does not exist for the stream. Type: number |
| encoding | Type of audio encoding used. The string is empty if the encoding is unknown. The content of the string is determined by the decoder and is supplied for trouble-shooting reasons. Type: string |
| language | A three character code, as specified by ISO 639 part 2. For the dual mono format, it describes the main channel language. Type: string |
| sampleRate | The sample rate of the audio in samples per second. The value will be set to -1 if the sample rate is unknown. This will be reported as unknown if it is not the currently active audio stream. Type: number |
| subLanguage | A three character code, as specified by ISO 639 part 2. Only set for dual mono format, it describes the sub channel language Type: string |
Identifier for a component type.
Struct fields
| Name | Description |
|---|---|
| id | Component entry identifier. Type: number |
| type | Component type. Type: ToiMediaPlayerBase.ToiComponentType |
Structure holding both the source of an error and the error code produced by that source.
Struct fields
| Name | Description |
|---|---|
| details | This value is completely implementation dependent Type: number |
| source | The source that emitted the error Type: ToiMediaPlayerBase.ToiErrorSource |
Data structure used to return buffering information.
Struct fields
| Name | Description |
|---|---|
| range | Buffered media range in milliseconds. Type: ToiMediaPlayerBase.ToiRange |
| saturationLevel | The degree of filling of the buffer media, i.e. the amount of buffer used. The saturation level calculation can be based on time or size depending on buffer type. The value set is 0.0 - 1.0. Type: double |
| type | Specific type of Media Buffer see ToiMediaPlayerBaseRange. Type: ToiMediaPlayerBase.ToiMediaBufferType |
Playback pace information data structure used to report pace information for the current media session.
Struct fields
| Name | Description |
|---|---|
| current | The current (actual) playback pace, based on e.g. the Presentation Time Stamp (PTS) in the stream. Type: number |
| requested | The pace requested by the application using e.g. ToiMediaPlayer#play Type: number |
| target | Target pace the platform is trying to achieve, based on limitations of the stream source (e.g. VOD server) or the hardware (e.g. decoder). Type: number |
Position information structure used to report position and pace information for the current media session.
Struct fields
| Name | Description |
|---|---|
| pace | The current pace information. Type: ToiMediaPlayerBase.ToiPaceInfo |
| position | The current playback position in milliseconds. Type: number |
| range | The position range in milliseconds for the current playback, i.e. the current valid position range for ToiMediaPlayer#playFromPosition. Type: ToiMediaPlayerBase.ToiRange |
Data structure used to return presentation info. Indicates whether audio and video are ready for presentation.
Technical Preview:
Struct fields
| Name | Description |
|---|---|
| isAudioLocked | The lock status of audio. True means audio data is available, sample rate is locked and audio is ready for presentation. Type: boolean |
| isVideoLocked | The lock status of video. True means video data is available, video decoder is running and at least one frame has been displayed. Type: boolean |
Range information data structure used to define a position range in milliseconds. The range is invalid if both positions are set to -1.
Struct fields
| Name | Description |
|---|---|
| endPosition | End position in milliseconds. Type: number |
| startPosition | Start position in milliseconds. Type: number |
Stream information data structure used to return generic metadata about a stream.
Struct fields
| Name | Description |
|---|---|
| activeComponents | List of the currently active component entries. Type: Array.<ToiMediaPlayerBase.ToiComponentEntry> |
| availableComponents | List of the currently available component entries. Type: Array.<ToiMediaPlayerBase.ToiComponentEntry> |
| paces | This list, if not empty, specifies supported paces for ToiMediaPlayer#play for the current stream. It is used for RTSP servers which support 'scales' parameter. Type: Array.<ToiMediaPlayerBase.ToiPace> |
| title | The title of the stream. The string is empty if the server does not support this feature. Type: string |
Subtitle stream data structure used to return subtitle information.
Struct fields
| Name | Description |
|---|---|
| aspectRatio | The video aspect ratio that the subtitle is designed to be used with. Type: ToiMediaPlayerBase.ToiAspectRatio |
| format | The type of the subtitle. Type: ToiMediaPlayerBase.ToiSubtitleFormat |
| language | A three character code as specified by ISO 639 part 2. Note: |
| receiveDmfMode | Receive DMF mode for ARIB CC/CS Type: ToiMediaPlayerBase.ToiReceiveDmfMode |
| recordDmfMode | Record DMF mode for ARIB CC/CS Type: ToiMediaPlayerBase.ToiRecordDmfMode |
| type | The type of the subtitle. Note: |
Video stream data structure used to return video stream information. Depending on the stream format some fields will be reported as unknown. The type of video encoding is the only field that will not be reported as unknown if it is not the currently active video stream.
Struct fields
| Name | Description |
|---|---|
| activeFormatDescriptor | The active format descriptor as specified in ETSI TS 101 154 Annex B. If the active format descriptor is unknown the value will be set to ToiMediaPlayerBase.ACTIVE_FORMAT_UNKNOWN. Type: ToiMediaPlayerBase.ToiActiveFormatDescriptor |
| aspectRatio | The pel aspect ratio code as specified in ISO/IEC 11172-2 section 2.4.3.2. If the aspect ratio is unknown the value will be set to ToiMediaPlayerBase.ASPECT_RATIO_UNKNOWN. Type: ToiMediaPlayerBase.ToiAspectRatio |
| componentTag | The audio component tag value. The value will be set to -1 if it does not exist for the stream. Type: number |
| encoding | Type of video encoding used. The string is empty if the encoding is unknown. The content of the string is determined by the decoder and is supplied for trouble-shooting reasons. Type: string |
| frameRate | The video frame rate. The frame is in thousands of a frame per second, ie the value will be 25 000 for a frame rate of 25 frames per second. If the frame rate is unknown the value will be set to -1. Type: number |
| resolutionX | The horizontal resolution of the video image in number of pixels. If the horizontal resolution is unknown the value is -1. Type: number |
| resolutionY | The vertical resolution of the video image in number of pixels. If the vertical resolution is unknown the value is -1. Type: number |
| scanMode | The video scan mode. Type: ToiMediaPlayerBase.ToiVideoScanMode |
| video3dFormat | 3D video source format detected in the SEI message Type: ToiMediaPlayerBase.ToiVideo3dSourceFormat |