• Quick Start
  • Booting
  • Platform
  • Portals
  • References
    • API Reference TOI3
    • IIP Reference
  • Resources
ARRIS Enterprises, Inc. Confidential Information

ToiMediaPlayerBase

Class Summary

Extends:
  • ToiEventTarget
See also:
  • ToiMediaService
  • ToiMediaPlayer

The ToiMediaPlayerBase interface is the base interface for player instances. It contains only read-only methods and no control functionality.

  • Methods
  • Members
  • Types
  • Events

Method Summary

getAudioStreamInfo ( mediaComponent )  → streamInfo

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 ( names )  → Array.<ToiMediaSession.ToiParameterInfo>

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 ( mediaComponent )  → streamInfo

Returns information about a specified subtitle stream in the current media stream multiplex in the form of a subtitle stream info structure.

getTeletextStreamInfo ( mediaComponent )  → streamInfo

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 ( mediaComponent )  → streamInfo

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 ( eventListener , names )

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 ( eventListener , names )

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 ( type , listener )

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 ( type , listener )

This method removes an event listener for a specific event.

Type Definitions

ToiActiveFormatDescriptor (Type: enum)

Active format descriptor used to identify the active video format provided in the ToiMediaPlayerBase.ToiVideoStreamInfo structure.

  • 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
ToiAspectRatio (Type: enum)

Aspect ratio identifier used to identify the video aspect ratio provided in the ToiMediaPlayerBase.ToiVideoStreamInfo structure.

  • ASPECT_RATIO_4_3
  • ASPECT_RATIO_16_9
  • ASPECT_RATIO_UNKNOWN
ToiAudioAudienceType (Type: enum)

Audio type identifier used to identify the audio type provided in the ToiMediaPlayerBase.ToiAudioStreamInfo structure.

  • AUDIO_AUDIENCE_TYPE_HEARING_IMPAIRED
  • AUDIO_AUDIENCE_TYPE_NORMAL
  • AUDIO_AUDIENCE_TYPE_UNKNOWN
  • AUDIO_AUDIENCE_TYPE_VISUALLY_IMPAIRED
ToiAudioChannelFormat (Type: enum)

The audio channel format specifies the number of channels and desired speaker setup.

  • AUDIO_CHANNEL_FORMAT_3_FRONT_1_BACK
  • AUDIO_CHANNEL_FORMAT_3_FRONT_2_BACK
  • AUDIO_CHANNEL_FORMAT_3_FRONT_2_BACK_LFE
  • AUDIO_CHANNEL_FORMAT_3_FRONT_2_SIDE_2_BACK_LFE
  • AUDIO_CHANNEL_FORMAT_DUAL_MONO
  • AUDIO_CHANNEL_FORMAT_SINGLE_MONO
  • AUDIO_CHANNEL_FORMAT_STEREO
  • AUDIO_CHANNEL_FORMAT_UNKNOWN
ToiAudioChannelMode (Type: enum)

The audio channel mode specifies audio channel to speaker mappings.

  • AUDIO_CHANNEL_MODE_DUAL_MONO_LEFT_ONLY
  • AUDIO_CHANNEL_MODE_DUAL_MONO_MIXED
  • AUDIO_CHANNEL_MODE_DUAL_MONO_RIGHT_ONLY
  • AUDIO_CHANNEL_MODE_DUAL_MONO_STEREO
  • AUDIO_CHANNEL_MODE_NORMAL
ToiComponentType (Type: enum)

Media component identifier types used to set and get information about media components of a session.

  • COMPONENT_AUDIO
  • COMPONENT_SUBTITLE
  • COMPONENT_SUBTITLE_CAPTION
  • COMPONENT_SUBTITLE_SUPERIMPOSE
  • COMPONENT_TELETEXT_VBI
  • COMPONENT_VIDEO
ToiErrorSource (Type: enum)

Enumeration of various sources that can cause an OnError event to occur. Typically, this can be a streamer element or similar low-level component.

  • SOURCE_INTERNAL
  • SOURCE_UNKNOWN
ToiMediaBufferType (Type: enum)

Media buffer types supported by the media player. Only one media buffer type is used for a given media player session

  • MEDIA_BUFFER_TYPE_DOWNLOAD
  • MEDIA_BUFFER_TYPE_TIMESHIFT
ToiPace (Type: number)

Supported pace

ToiReceiveDmfMode (Type: enum)

Receive DMF mode used for ARIB CC/CS

  • RECEIVE_DMF_MODE_AUTO
  • RECEIVE_DMF_MODE_NON_AUTO
  • RECEIVE_DMF_MODE_SELECT
  • RECEIVE_DMF_MODE_SPECIAL
ToiRecordDmfMode (Type: enum)

Receive DMF mode used for ARIB CC/CS

  • RECORD_DMF_MODE_AUTO
  • RECORD_DMF_MODE_NON_AUTO
  • RECORD_DMF_MODE_SELECT
ToiState (Type: enum)

Enumeration of media player states.

  • STATE_CONNECTING
  • STATE_FAILED
  • STATE_FASTFORWARDING
  • STATE_IDLE
  • STATE_PAUSED
  • STATE_PLAYING
  • STATE_REWINDING
ToiSubtitleFormat (Type: enum)

Subtitle format identifier used to identify the subtitle format provided in the ToiMediaPlayerBase.ToiSubtitleStreamInfo structure.

  • SUBTITLE_ARIB
  • SUBTITLE_DVB
  • SUBTITLE_DVD
  • SUBTITLE_SCTE27
  • SUBTITLE_SRT
  • SUBTITLE_TELETEXT
  • SUBTITLE_WEBVTT
  • SUBTITLE_XSUB
ToiSubtitleType (Type: enum)

Subtitle type identifier used to identify the subtitle type provided in the ToiMediaPlayerBase.ToiSubtitleStreamInfo structure.

  • SUBTITLE_HEARING_IMPAIRED
  • SUBTITLE_NORMAL
  • SUBTITLE_UNKNOWN
ToiVideo3dSourceFormat (Type: enum)

Defines the 3D video formats as specified in H.264 SEI frame packing message (see related ISO/IEC document for details).

  • VIDEO_3D_FORMAT_CANCELED
  • VIDEO_3D_FORMAT_NOT_SPECIFIED
  • VIDEO_3D_SRC_FORMAT_CHECKERBOARD
  • VIDEO_3D_SRC_FORMAT_COLUMN_BASED
  • VIDEO_3D_SRC_FORMAT_RESERVED
  • VIDEO_3D_SRC_FORMAT_ROW_BASED
  • VIDEO_3D_SRC_FORMAT_SIDE_BY_SIDE
  • VIDEO_3D_SRC_FORMAT_TEMPORAL
  • VIDEO_3D_SRC_FORMAT_TOP_BOTTOM
ToiVideoScanMode (Type: enum)

Defines the video scan mode

  • VIDEO_SCAN_MODE_INTERLACED
  • VIDEO_SCAN_MODE_PROGRESSIVE
  • VIDEO_SCAN_MODE_UNKNOWN

Events

  • ON_CAPABILITIES_CHANGED
  • ON_DATA_AVAILABLE
  • ON_MEDIA_BUFFER_STATUS_CHANGED
  • ON_PARAMETER_CHANGED
  • ON_POSITION_STATUS_CHANGED
  • ON_PRESENTATION_STATUS_CHANGED
  • ON_STATE_CHANGED
  • ON_STREAM_INFO_CHANGED

Methods

addEventListener ( type , listener )

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:

  • ToiEventTarget#addEventListener

Parameters:

Name Type Description
type number

The event type of the event to subscribe to.

listener ToiEventListener

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.

getAudioStreamInfo ( mediaComponent )  → streamInfo

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
mediaComponent ToiMediaPlayerBase.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:

Information about the specified audio stream.

Type: ToiMediaPlayerBase.ToiAudioStreamInfo
getCapabilities ( )  → capabilityMask

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:

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
Type: number
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.

Returns:

The error

Type: ToiMediaPlayerBase.ToiError
getMediaBufferInfo ( )  → info

Returns information about the current status of the media buffer.

See also:

  • ToiMediaPlayerMediaBufferStatusChangedEvent

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:

The current media buffer information.

Type: ToiMediaPlayerBase.ToiMediaBufferInfo
getParameters ( names )  → Array.<ToiMediaSession.ToiParameterInfo>

Get the values of several parameters.

See also:

  • ToiMediaPlayer#setParameters
  • ToiMediaPlayer#unsetParameters
  • ToiMediaPlayerBase#subscribeParameters

Parameters:

Name Type Description
names Array.<ToiMediaSession.ToiParameterName>

A list of parameter names.

Throws:

ToiUnavailableException

Raised if the player is temporarily unavailable due to platform resource management.

Returns:

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.

Type: Array.<ToiMediaSession.ToiParameterInfo>
getPositionInfo ( )  → positionInfo

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:

Position and pace information for the current media session.

Type: ToiMediaPlayerBase.ToiPositionInfo
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.

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:

Information about the current lock status of video and audio.

Type: ToiMediaPlayerBase.ToiPresentationInfo
getSessionId ( )  → id

Returns the session identifier. This identifier can be used to open a session object with ToiMediaService#openSession.

See also:

  • ToiMediaService#openSession

Throws:

ToiSessionViolationException

If the player is in ToiMediaPlayerBase.STATE_IDLE a session violation exception is raised.

Returns:

The session identifier.

Type: ToiMediaSession.ToiSessionId
getState ( )  → state

Returns the current state of the media player instance.

Returns:

The current player state.

Type: ToiMediaPlayerBase.ToiState
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.

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:

Information about the current stream.

Type: ToiMediaPlayerBase.ToiStreamInfo
getSubtitleStreamInfo ( mediaComponent )  → streamInfo

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
mediaComponent ToiMediaPlayerBase.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:

Information about the specified subtitle stream.

Type: ToiMediaPlayerBase.ToiSubtitleStreamInfo
getTeletextStreamInfo ( mediaComponent )  → streamInfo

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
mediaComponent ToiMediaPlayerBase.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:

Information about the specified teletext stream.

Type: ToiMediaPlayerBase.ToiTeletextStreamInfo
getUrl ( )  → url

Returns the URL for the media stream.

Throws:

ToiSessionViolationException

If the player is in ToiMediaPlayerBase.STATE_IDLE a session violation exception is raised.

Returns:

The URL for the media stream.

Type: string
getVideoStreamInfo ( mediaComponent )  → streamInfo

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
mediaComponent ToiMediaPlayerBase.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:

Information about the specified video stream.

Type: ToiMediaPlayerBase.ToiVideoStreamInfo
releaseInstance ( )

This function releases the resources used by this instance. When this function returns all observers has also been released.

removeEventListener ( type , listener )

This method removes an event listener for a specific event.

Inherited From:

  • ToiEventTarget#removeEventListener

Parameters:

Name Type Description
type number

The event type of the event to remove the listener from.

listener ToiEventListener

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.

subscribeParameters ( eventListener , names )

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:

  • ToiMediaPlayerBase#unsubscribeParameters

Parameters:

Name Type Description
eventListener ToiEventListener

The eventListener that has been registered.

names Array.<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.

unsubscribeParameters ( eventListener , names )

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:

  • ToiMediaPlayerBase#subscribeParameters

Parameters:

Name Type Description
eventListener ToiEventListener

The eventListener that has been registered.

names Array.<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

ON_CAPABILITIES_CHANGED (Type: ToiMediaPlayerCapabilitiesChangedEvent) (value = 1706) (static, constant)

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 constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ON_CAPABILITIES_CHANGED.
ON_DATA_AVAILABLE (Type: ToiMediaPlayerDataAvailableEvent) (value = 1701) (static, constant)

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 constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ON_DATA_AVAILABLE.
ON_MEDIA_BUFFER_STATUS_CHANGED (Type: ToiMediaPlayerMediaBufferStatusChangedEvent) (value = 1708) (static, constant)

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 constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ON_MEDIA_BUFFER_STATUS_CHANGED.
ON_PARAMETER_CHANGED (Type: ToiMediaPlayerParameterChangedEvent) (value = 1704) (static, constant)

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 constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ON_PARAMETER_CHANGED.
ON_POSITION_STATUS_CHANGED (Type: ToiMediaPlayerPositionStatusChangedEvent) (value = 1702) (static, constant)

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 constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ON_POSITION_STATUS_CHANGED.
ON_PRESENTATION_STATUS_CHANGED (Type: ToiMediaPlayerPresentationStatusChangedEvent) (value = 1707) (static, constant)

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 constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ON_PRESENTATION_STATUS_CHANGED.
ON_STATE_CHANGED (Type: ToiMediaPlayerStateChangedEvent) (value = 1700) (static, constant)

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 constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ON_STATE_CHANGED.
ON_STREAM_INFO_CHANGED (Type: ToiMediaPlayerStreamInfoChangedEvent) (value = 1703) (static, constant)

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.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ON_STREAM_INFO_CHANGED.
ACTIVE_FORMAT_4_3_CENTRE (Type: ToiMediaPlayerBase.ToiActiveFormatDescriptor) (value = 5) (static, constant)

The active format descriptor is 4:3 centre.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ACTIVE_FORMAT_4_3_CENTRE.
ACTIVE_FORMAT_4_3_SHOOT_AND_PROTECT_14_9_CENTRE (Type: ToiMediaPlayerBase.ToiActiveFormatDescriptor) (value = 8) (static, constant)

The active format descriptor is 4:3 with shoot and protect 14:9 centre.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ACTIVE_FORMAT_4_3_SHOOT_AND_PROTECT_14_9_CENTRE.
ACTIVE_FORMAT_14_9_CENTRE (Type: ToiMediaPlayerBase.ToiActiveFormatDescriptor) (value = 7) (static, constant)

The active format descriptor is 14:9 centre.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ACTIVE_FORMAT_14_9_CENTRE.
ACTIVE_FORMAT_14_9_TOP (Type: ToiMediaPlayerBase.ToiActiveFormatDescriptor) (value = 2) (static, constant)

The active format descriptor is 14:9 top.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ACTIVE_FORMAT_14_9_TOP.
ACTIVE_FORMAT_16_9_CENTRE (Type: ToiMediaPlayerBase.ToiActiveFormatDescriptor) (value = 6) (static, constant)

The active format descriptor is 16:9 centre.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ACTIVE_FORMAT_16_9_CENTRE.
ACTIVE_FORMAT_16_9_SHOOT_AND_PROTECT_4_3_CENTRE (Type: ToiMediaPlayerBase.ToiActiveFormatDescriptor) (value = 10) (static, constant)

The active format descriptor is 16:9 with shoot and protect 4:3 centre.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ACTIVE_FORMAT_16_9_SHOOT_AND_PROTECT_4_3_CENTRE.
ACTIVE_FORMAT_16_9_SHOOT_AND_PROTECT_14_9_CENTRE (Type: ToiMediaPlayerBase.ToiActiveFormatDescriptor) (value = 9) (static, constant)

The active format descriptor is 16:9 with shoot and protect 14:9 centre.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ACTIVE_FORMAT_16_9_SHOOT_AND_PROTECT_14_9_CENTRE.
ACTIVE_FORMAT_16_9_TOP (Type: ToiMediaPlayerBase.ToiActiveFormatDescriptor) (value = 1) (static, constant)

The active format descriptor is 16:9 top.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ACTIVE_FORMAT_16_9_TOP.
ACTIVE_FORMAT_MORE_THAN_16_9_CENTRE (Type: ToiMediaPlayerBase.ToiActiveFormatDescriptor) (value = 3) (static, constant)

The active format descriptor is > 16:9 centre.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ACTIVE_FORMAT_MORE_THAN_16_9_CENTRE.
ACTIVE_FORMAT_SAME_AS_CODED (Type: ToiMediaPlayerBase.ToiActiveFormatDescriptor) (value = 4) (static, constant)

The active format descriptor is same as coded.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ACTIVE_FORMAT_SAME_AS_CODED.
ACTIVE_FORMAT_UNKNOWN (Type: ToiMediaPlayerBase.ToiActiveFormatDescriptor) (value = 0) (static, constant)

The active format descriptor is not known.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ACTIVE_FORMAT_UNKNOWN.
ASPECT_RATIO_4_3 (Type: ToiMediaPlayerBase.ToiAspectRatio) (value = 1) (static, constant)

The aspect ratio is 4:3

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ASPECT_RATIO_4_3.
ASPECT_RATIO_16_9 (Type: ToiMediaPlayerBase.ToiAspectRatio) (value = 2) (static, constant)

The aspect ratio is 16:9

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ASPECT_RATIO_16_9.
ASPECT_RATIO_UNKNOWN (Type: ToiMediaPlayerBase.ToiAspectRatio) (value = 0) (static, constant)

The aspect ratio is not known.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.ASPECT_RATIO_UNKNOWN.
AUDIO_AUDIENCE_TYPE_HEARING_IMPAIRED (Type: ToiMediaPlayerBase.ToiAudioAudienceType) (value = 3) (static, constant)

The audio is prepared for the hearing impaired.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.AUDIO_AUDIENCE_TYPE_HEARING_IMPAIRED.
AUDIO_AUDIENCE_TYPE_NORMAL (Type: ToiMediaPlayerBase.ToiAudioAudienceType) (value = 1) (static, constant)

The audio is prepared for normal audiance.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.AUDIO_AUDIENCE_TYPE_NORMAL.
AUDIO_AUDIENCE_TYPE_UNKNOWN (Type: ToiMediaPlayerBase.ToiAudioAudienceType) (value = 0) (static, constant)

The audience type of the audio is not known.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.AUDIO_AUDIENCE_TYPE_UNKNOWN.
AUDIO_AUDIENCE_TYPE_VISUALLY_IMPAIRED (Type: ToiMediaPlayerBase.ToiAudioAudienceType) (value = 2) (static, constant)

The audio is prepared for the visually impaired.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.AUDIO_AUDIENCE_TYPE_VISUALLY_IMPAIRED.
AUDIO_CHANNEL_FORMAT_3_FRONT_1_BACK (Type: ToiMediaPlayerBase.ToiAudioChannelFormat) (value = 4) (static, constant)

Four audio channels. Three front and one back speakers.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.AUDIO_CHANNEL_FORMAT_3_FRONT_1_BACK.
AUDIO_CHANNEL_FORMAT_3_FRONT_2_BACK (Type: ToiMediaPlayerBase.ToiAudioChannelFormat) (value = 5) (static, constant)

Five audio channels. Three front and two back speakers.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.AUDIO_CHANNEL_FORMAT_3_FRONT_2_BACK.
AUDIO_CHANNEL_FORMAT_3_FRONT_2_BACK_LFE (Type: ToiMediaPlayerBase.ToiAudioChannelFormat) (value = 6) (static, constant)

Five audio channels. Three front and two back speakers. One low frequency effects channel (LFE). One subwoofer speaker.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.AUDIO_CHANNEL_FORMAT_3_FRONT_2_BACK_LFE.
AUDIO_CHANNEL_FORMAT_3_FRONT_2_SIDE_2_BACK_LFE (Type: ToiMediaPlayerBase.ToiAudioChannelFormat) (value = 7) (static, constant)

Seven audio channels. Three front, two side and two back speakers. One low frequency effects channel (LFE). One subwoofer speaker.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.AUDIO_CHANNEL_FORMAT_3_FRONT_2_SIDE_2_BACK_LFE.
AUDIO_CHANNEL_FORMAT_DUAL_MONO (Type: ToiMediaPlayerBase.ToiAudioChannelFormat) (value = 2) (static, constant)

Two content separate audio channels. Either one or two speakers.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.AUDIO_CHANNEL_FORMAT_DUAL_MONO.
AUDIO_CHANNEL_FORMAT_SINGLE_MONO (Type: ToiMediaPlayerBase.ToiAudioChannelFormat) (value = 1) (static, constant)

One audio channel. One speaker.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.AUDIO_CHANNEL_FORMAT_SINGLE_MONO.
AUDIO_CHANNEL_FORMAT_STEREO (Type: ToiMediaPlayerBase.ToiAudioChannelFormat) (value = 3) (static, constant)

Two audio channels. Two front speakers.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.AUDIO_CHANNEL_FORMAT_STEREO.
AUDIO_CHANNEL_FORMAT_UNKNOWN (Type: ToiMediaPlayerBase.ToiAudioChannelFormat) (value = 0) (static, constant)

The audio channel format is not known.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.AUDIO_CHANNEL_FORMAT_UNKNOWN.
AUDIO_CHANNEL_MODE_DUAL_MONO_LEFT_ONLY (Type: ToiMediaPlayerBase.ToiAudioChannelMode) (value = 1) (static, constant)

The dual mono mode where the left channel is sent to both left and right front speaker outputs.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.AUDIO_CHANNEL_MODE_DUAL_MONO_LEFT_ONLY.
AUDIO_CHANNEL_MODE_DUAL_MONO_MIXED (Type: ToiMediaPlayerBase.ToiAudioChannelMode) (value = 4) (static, constant)

The dual mono mode where the left and right channels are mixed and sent to both left and right front speaker outputs

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.AUDIO_CHANNEL_MODE_DUAL_MONO_MIXED.
AUDIO_CHANNEL_MODE_DUAL_MONO_RIGHT_ONLY (Type: ToiMediaPlayerBase.ToiAudioChannelMode) (value = 2) (static, constant)

The dual mono mode where the right channel is sent to both left and right front speaker outputs.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.AUDIO_CHANNEL_MODE_DUAL_MONO_RIGHT_ONLY.
AUDIO_CHANNEL_MODE_DUAL_MONO_STEREO (Type: ToiMediaPlayerBase.ToiAudioChannelMode) (value = 3) (static, constant)

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

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.AUDIO_CHANNEL_MODE_DUAL_MONO_STEREO.
AUDIO_CHANNEL_MODE_NORMAL (Type: ToiMediaPlayerBase.ToiAudioChannelMode) (value = 0) (static, constant)

The normal mode where each channel is sent to its speaker output.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.AUDIO_CHANNEL_MODE_NORMAL.
CAPABILITY_FASTFORWARD (Type: number) (value = 4) (static, constant)

When this bit is set the session accepts the ToiMediaPlayer.Play([pace > 0]) command.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.CAPABILITY_FASTFORWARD.
CAPABILITY_FREEZE (Type: number) (value = 32) (static, constant)

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.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.CAPABILITY_FREEZE.
CAPABILITY_GETPOSITION (Type: number) (value = 8) (static, constant)

When this bit is set the session provides a position value which the client may read with ToiMediaPlayerBase#getPositionInfo and similar commands.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.CAPABILITY_GETPOSITION.
CAPABILITY_MEDIA_BUFFER (Type: number) (value = 128) (static, constant)

When this bit is set the session supports some type of media buffering and the client can get media buffer information using ToiMediaPlayerBase#getMediaBufferInfo.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.CAPABILITY_MEDIA_BUFFER.
CAPABILITY_PAUSE (Type: number) (value = 1) (static, constant)

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.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.CAPABILITY_PAUSE.
CAPABILITY_REWIND (Type: number) (value = 2) (static, constant)

When this bit is set the session accepts the ToiMediaPlayer.Play([pace < 0]) command.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.CAPABILITY_REWIND.
CAPABILITY_SETPOSITION (Type: number) (value = 16) (static, constant)

When this bit is set the session accepts the position to be set ToiMediaPlayer#playFromPosition.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.CAPABILITY_SETPOSITION.
CAPABILITY_TIMESHIFT (Type: number) (value = 64) (static, constant)

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.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.CAPABILITY_TIMESHIFT.
COMPONENT_AUDIO (Type: ToiMediaPlayerBase.ToiComponentType) (value = 0) (static, constant)

Audio components have information of type ToiMediaPlayerBase.ToiAudioStreamInfo.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.COMPONENT_AUDIO.
COMPONENT_SUBTITLE (Type: ToiMediaPlayerBase.ToiComponentType) (value = 2) (static, constant)

Denotes a regular subtitling component.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.COMPONENT_SUBTITLE.
COMPONENT_SUBTITLE_CAPTION (Type: ToiMediaPlayerBase.ToiComponentType) (value = 3) (static, constant)

This is an ARIB specific type of subtitles.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.COMPONENT_SUBTITLE_CAPTION.

Technical Preview:

This enumerator is a TECHNICAL PREVIEW, it may change.
COMPONENT_SUBTITLE_SUPERIMPOSE (Type: ToiMediaPlayerBase.ToiComponentType) (value = 4) (static, constant)

This is an ARIB specific type of subtitles and used mainly for displaying alert messages on screen.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.COMPONENT_SUBTITLE_SUPERIMPOSE.

Technical Preview:

This enumerator is a TECHNICAL PREVIEW, it may change.
COMPONENT_TELETEXT_VBI (Type: ToiMediaPlayerBase.ToiComponentType) (value = 5) (static, constant)

Teletext VBI component have information of type ToiMediaPlayerBase.ToiTeletextStreamInfo&.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.COMPONENT_TELETEXT_VBI.
COMPONENT_VIDEO (Type: ToiMediaPlayerBase.ToiComponentType) (value = 1) (static, constant)

Video components have information of type ToiMediaPlayerBase.ToiVideoStreamInfo.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.COMPONENT_VIDEO.
MEDIA_BUFFER_TYPE_DOWNLOAD (Type: ToiMediaPlayerBase.ToiMediaBufferType) (value = 1) (static, constant)

Media download buffer Used

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.MEDIA_BUFFER_TYPE_DOWNLOAD.
MEDIA_BUFFER_TYPE_TIMESHIFT (Type: ToiMediaPlayerBase.ToiMediaBufferType) (value = 0) (static, constant)

Timeshifter buffer Used

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.MEDIA_BUFFER_TYPE_TIMESHIFT.
PACE_FASTFORWARD (Type: number) (value = 5000) (static, constant)

Predefined argument value for ToiMediaPlayer#play. Indicates that the player should play with a normal fast forward speed.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.PACE_FASTFORWARD.
PACE_PAUSE (Type: number) (value = 0) (static, constant)

Predefined argument value for ToiMediaPlayer#play. Indicates that the player should be paused.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.PACE_PAUSE.
PACE_PLAY (Type: number) (value = 1000) (static, constant)

Predefined argument value for ToiMediaPlayer#play. Indicates that the player should play with normal speed.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.PACE_PLAY.
PACE_REWIND (Type: number) (value = -5000) (static, constant)

Predefined argument value for ToiMediaPlayer#play. Indicates that the player should play with a normal rewind speed.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.PACE_REWIND.
POSITION_LIVE (Type: number) (value = -1616928864) (static, constant)

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.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.POSITION_LIVE.
RECEIVE_DMF_MODE_AUTO (Type: ToiMediaPlayerBase.ToiReceiveDmfMode) (value = 0) (static, constant)

Automatic mode.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.RECEIVE_DMF_MODE_AUTO.
RECEIVE_DMF_MODE_NON_AUTO (Type: ToiMediaPlayerBase.ToiReceiveDmfMode) (value = 1) (static, constant)

Non-automatic mode.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.RECEIVE_DMF_MODE_NON_AUTO.
RECEIVE_DMF_MODE_SELECT (Type: ToiMediaPlayerBase.ToiReceiveDmfMode) (value = 2) (static, constant)

Select mode.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.RECEIVE_DMF_MODE_SELECT.
RECEIVE_DMF_MODE_SPECIAL (Type: ToiMediaPlayerBase.ToiReceiveDmfMode) (value = 3) (static, constant)

Special mode.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.RECEIVE_DMF_MODE_SPECIAL.
RECORD_DMF_MODE_AUTO (Type: ToiMediaPlayerBase.ToiRecordDmfMode) (value = 0) (static, constant)

Automatic mode.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.RECORD_DMF_MODE_AUTO.
RECORD_DMF_MODE_NON_AUTO (Type: ToiMediaPlayerBase.ToiRecordDmfMode) (value = 1) (static, constant)

Non-automatic mode.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.RECORD_DMF_MODE_NON_AUTO.
RECORD_DMF_MODE_SELECT (Type: ToiMediaPlayerBase.ToiRecordDmfMode) (value = 2) (static, constant)

Select mode.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.RECORD_DMF_MODE_SELECT.
SOURCE_INTERNAL (Type: ToiMediaPlayerBase.ToiErrorSource) (value = 1) (static, constant)

ToiMediaPlayerBase.SOURCE_INTERNAL - An internal failure occurred before an error code could be retrieved.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.SOURCE_INTERNAL.
SOURCE_UNKNOWN (Type: ToiMediaPlayerBase.ToiErrorSource) (value = 0) (static, constant)

ToiMediaPlayerBase.SOURCE_UNKNOWN - An error of unknown type has occurred.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.SOURCE_UNKNOWN.
STATE_CONNECTING (Type: ToiMediaPlayerBase.ToiState) (value = 1) (static, constant)

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.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.STATE_CONNECTING.
STATE_FAILED (Type: ToiMediaPlayerBase.ToiState) (value = 6) (static, constant)

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.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.STATE_FAILED.
STATE_FASTFORWARDING (Type: ToiMediaPlayerBase.ToiState) (value = 4) (static, constant)

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.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.STATE_FASTFORWARDING.
STATE_IDLE (Type: ToiMediaPlayerBase.ToiState) (value = 0) (static, constant)

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.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.STATE_IDLE.
STATE_PAUSED (Type: ToiMediaPlayerBase.ToiState) (value = 2) (static, constant)

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.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.STATE_PAUSED.
STATE_PLAYING (Type: ToiMediaPlayerBase.ToiState) (value = 3) (static, constant)

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.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.STATE_PLAYING.
STATE_REWINDING (Type: ToiMediaPlayerBase.ToiState) (value = 5) (static, constant)

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.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.STATE_REWINDING.
SUBTITLE_ARIB (Type: ToiMediaPlayerBase.ToiSubtitleFormat) (value = 1) (static, constant)

The subtitles are in ARIB format.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.SUBTITLE_ARIB.
SUBTITLE_DVB (Type: ToiMediaPlayerBase.ToiSubtitleFormat) (value = 0) (static, constant)

The subtitles are in DVB format.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.SUBTITLE_DVB.
SUBTITLE_DVD (Type: ToiMediaPlayerBase.ToiSubtitleFormat) (value = 3) (static, constant)

The subtitles are in DVD format.

Deprecated:
Not supported.
This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.SUBTITLE_DVD.
SUBTITLE_HEARING_IMPAIRED (Type: ToiMediaPlayerBase.ToiSubtitleType) (value = 2) (static, constant)

The subtitles are designed for the hearing impaired.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.SUBTITLE_HEARING_IMPAIRED.
SUBTITLE_NORMAL (Type: ToiMediaPlayerBase.ToiSubtitleType) (value = 1) (static, constant)

The subtitles are designed for normal audience.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.SUBTITLE_NORMAL.
SUBTITLE_SCTE27 (Type: ToiMediaPlayerBase.ToiSubtitleFormat) (value = 6) (static, constant)

The subtitles are in SCTE-27 (Society of Cable Telecommunications Engineers) format.

Deprecated:
Not supported.
This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.SUBTITLE_SCTE27.
SUBTITLE_SRT (Type: ToiMediaPlayerBase.ToiSubtitleFormat) (value = 5) (static, constant)

The subtitles are in SRT (SubRip Text) format.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.SUBTITLE_SRT.
SUBTITLE_TELETEXT (Type: ToiMediaPlayerBase.ToiSubtitleFormat) (value = 2) (static, constant)

The subtitles are in Teletext format.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.SUBTITLE_TELETEXT.
SUBTITLE_UNKNOWN (Type: ToiMediaPlayerBase.ToiSubtitleType) (value = 0) (static, constant)

The type of subtitles is not known.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.SUBTITLE_UNKNOWN.
SUBTITLE_WEBVTT (Type: ToiMediaPlayerBase.ToiSubtitleFormat) (value = 7) (static, constant)

The subtitles are in WEBVTT (Web Video Text Track) format.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.SUBTITLE_WEBVTT.
SUBTITLE_XSUB (Type: ToiMediaPlayerBase.ToiSubtitleFormat) (value = 4) (static, constant)

The subtitles are in XSUB or XSUB plus format.

Deprecated:
Not supported.
This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.SUBTITLE_XSUB.
VIDEO_3D_FORMAT_CANCELED (Type: ToiMediaPlayerBase.ToiVideo3dSourceFormat) (value = 128) (static, constant)

Indicates cancel flag set.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.VIDEO_3D_FORMAT_CANCELED.
VIDEO_3D_FORMAT_NOT_SPECIFIED (Type: ToiMediaPlayerBase.ToiVideo3dSourceFormat) (value = 255) (static, constant)

Indicates SEI message absent.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.VIDEO_3D_FORMAT_NOT_SPECIFIED.
VIDEO_3D_SRC_FORMAT_CHECKERBOARD (Type: ToiMediaPlayerBase.ToiVideo3dSourceFormat) (value = 0) (static, constant)

Checkboard based arrangement.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.VIDEO_3D_SRC_FORMAT_CHECKERBOARD.
VIDEO_3D_SRC_FORMAT_COLUMN_BASED (Type: ToiMediaPlayerBase.ToiVideo3dSourceFormat) (value = 1) (static, constant)

Column based arrangement.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.VIDEO_3D_SRC_FORMAT_COLUMN_BASED.
VIDEO_3D_SRC_FORMAT_RESERVED (Type: ToiMediaPlayerBase.ToiVideo3dSourceFormat) (value = 6) (static, constant)

Reserved values.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.VIDEO_3D_SRC_FORMAT_RESERVED.
VIDEO_3D_SRC_FORMAT_ROW_BASED (Type: ToiMediaPlayerBase.ToiVideo3dSourceFormat) (value = 2) (static, constant)

Row based arrangement.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.VIDEO_3D_SRC_FORMAT_ROW_BASED.
VIDEO_3D_SRC_FORMAT_SIDE_BY_SIDE (Type: ToiMediaPlayerBase.ToiVideo3dSourceFormat) (value = 3) (static, constant)

Side-by-side packing arrangement.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.VIDEO_3D_SRC_FORMAT_SIDE_BY_SIDE.
VIDEO_3D_SRC_FORMAT_TEMPORAL (Type: ToiMediaPlayerBase.ToiVideo3dSourceFormat) (value = 5) (static, constant)

Temporal interleaving arrangement.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.VIDEO_3D_SRC_FORMAT_TEMPORAL.
VIDEO_3D_SRC_FORMAT_TOP_BOTTOM (Type: ToiMediaPlayerBase.ToiVideo3dSourceFormat) (value = 4) (static, constant)

Top-bottom packing arrangement.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.VIDEO_3D_SRC_FORMAT_TOP_BOTTOM.
VIDEO_SCAN_MODE_INTERLACED (Type: ToiMediaPlayerBase.ToiVideoScanMode) (value = 1) (static, constant)

Interlaced video.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.VIDEO_SCAN_MODE_INTERLACED.
VIDEO_SCAN_MODE_PROGRESSIVE (Type: ToiMediaPlayerBase.ToiVideoScanMode) (value = 2) (static, constant)

Progressive video.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.VIDEO_SCAN_MODE_PROGRESSIVE.
VIDEO_SCAN_MODE_UNKNOWN (Type: ToiMediaPlayerBase.ToiVideoScanMode) (value = 0) (static, constant)

Scan mode is unknown.

This constant can be also be accessed from toi.consts.ToiMediaPlayerBase.VIDEO_SCAN_MODE_UNKNOWN.
ToiAudioStreamInfo (Type: struct) (static)

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

ToiComponentEntry (Type: struct) (static)

Identifier for a component type.

Struct fields

Name Description
id

Component entry identifier.

Type: number
type

Component type.

Type: ToiMediaPlayerBase.ToiComponentType

ToiError (Type: struct) (static)

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

ToiMediaBufferInfo (Type: struct) (static)

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

ToiPaceInfo (Type: struct) (static)

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

ToiPositionInfo (Type: struct) (static)

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

ToiPresentationInfo (Type: struct) (static)

Data structure used to return presentation info. Indicates whether audio and video are ready for presentation.

Technical Preview:

This structure is a TECHNICAL PREVIEW, it may change.

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

ToiRange (Type: struct) (static)

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

ToiStreamInfo (Type: struct) (static)

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

ToiSubtitleStreamInfo (Type: struct) (static)

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:

{For DivX it's either und or languageTag-[countryTag] as specified in DivX media format specification.}
Type: string
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:

{For Avi/DivX request "_AviSubtitleTypeCode" parameter to acquire subtitle type code}
Type: ToiMediaPlayerBase.ToiSubtitleType

ToiTeletextStreamInfo (Type: struct) (static)

Teletext stream data structure used to return teletext information.

Struct fields

Name Description
language

A three character code as specified by ISO 639 part 2.

Type: string

ToiVideoStreamInfo (Type: struct) (static)

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

5.0.1

Copyright (c) 2016 ARRIS Enterprises, LLC. All Rights Reserved. ARRIS Enterprises, LLC. Confidential Information.