KONtx Media Player Enumeration Constants

The following section describes the KONtx Media Player enumeration constants.

KONtx.mediaplayer.constants.keys

Toolbox media player remote control key enumeration constants

When using enumeration constants always use the keys and do not depend on the value not changing. The table below describes the enumeration constants for the possible remote control keys controlling the OEM-specific media player.

Constant

Description

Value

FASTFORWARD or FORWARD

Fast forward remote control key.

417

PAUSE

Pause remote control key.

414

PLAY

Play remote control key.

415

REWIND

Rewind remote control key.

412

STOP

Stop remote control key

413

SYSTEM_PAUSE

The System Pause or Break key from the keyboard used by some device partners. The correct key is the PAUSE key above.

19

KONtx.mediaplayer.constants.states

Toolbox media player states enumeration constants

When using enumeration constants always use the keys and do not depend on the value not changing. This list may change as new OEM partners are added. The table below describes the enumeration constants for the possible OEM-specific media player states. Not all media player states are used on all platforms.

Constant

Description

BUFFEREMPTY

The buffer is completely empty. The media may pause because there is no data in the buffer. Rebuffering should begin.

BUFFERING

The video file is currently being buffered. The OEM-specific player should buffer data as soon as a stream is created or if an existing stream is switched. The property KONtx.mediaplayer.isPlaylistEntryActive returns true when the OEM-specific media player is in this state.

EOF

The OEM-specific media player has reached the end of the media file.

ERROR

An error was received from the OEM-specific media player.

FASTFORWARD or FORWARD or FF

The video is moving fast forward. The property KONtx.mediaplayer.isPlaylistEntryActive returns true when the OEM-specific media player is in this state.

INFOLOADED

Information has been loaded, including header file information and media data. The property KONtx.mediaplayer.isPlaylistEntryActive returns true when the OEM-specific media player is in this state.

INIT

The OEM-specific media player is initializing.

PAUSE

The video is paused. The property KONtx.mediaplayer.isPlaylistEntryActive returns true when the OEM-specific media player is in this state.

PLAY

The media is playing. The property KONtx.mediaplayer.isPlaylistEntryActive returns true when the OEM-specific media player is in this state.

REWIND

The video is rewinding. The property KONtx.mediaplayer.isPlaylistEntryActive returns true when the OEM-specific media player is in this state.

STOP

The video is stopped.

UNKNOWN

The OEM-specific media player state is unknown.

KONtx.mediaplayer.constants.streamswitch

Toolbox media player enumeration constants

When using enumeration constants always use the keys and do not depend on the value not changing. The table below describes the enumeration constants for the possible stream switch algorithms.

Constant

Description

BANDWIDTH

The BANDWIDTH stream switching algorithm is used when the KONtx.mediaplayer.control.streamswitch(KONtx.mediaplayer.constants.streamswitch.BANDWIDTH, config) method is called. This algorithm allows you to provide an updated connection bitrate config.bitrate and an updated connection margin config.margin and then allows the media player to choose the best stream. If you choose this option, the config parameter is an Object with bitrate and margin properties. The bitrate property is the bitrate of the consumer’s connection as tested through KONtx.speedtest. The margin property is the margin factor to apply to the consumer’s bandwidth. Valid values are between 0 and 1. The margin property defaults to 1 or what was previously set if not provided. See the method setConnectionBandwidth() for more details.

INDEX_CHANGE

The INDEX_CHANGE stream switching algorithm is used when the KONtx.mediaplayer.control.streamswitch(KONtx.mediaplayer.constants.streamswitch.INDEX_CHANGE, config) method is called. This algorithm allows you to increase or decrease the selected stream by a specified amount. The config.direction property is the direction to change. Possible valid values for direction are String values up and down, the default value is down. The config.offset_amount property is the bitrate increment to increase or decrease. This offset value can be more than the available stream bitrate. If you provide a config.direction but not an config.offset_amount, then the config.offset_amount is defaulted to 1.

Table of Contents