Classes

Enumerations

CaptionsType

static

string

Captions type. If a captions type is encountered outside of this list, MPL will still fetch the data but not parse it. The raw data must be handled by the host application via the processSegment callback and is ultimately responsible for displaying it.

Value

UNKNOWN

Unknown closed captioning.

WEBVTT

Web video text track format.

TTML

Timed text markup language.

CEA608

CEA-608 closed captioning.

STPP

SMPTE Timed text markup language.

ContentProtection

static

string

Content protection type.

Value

NONE

No content protection.

CLEARKEY

Clearkey system.

PLAYREADY

PlayReady DRM.

WIDEVINE

Widevine DRM.

ErrorCode

static

number

Errors that can be reported by the player to the host.

Value

UNKNOWN

Unknown player error.

PLAYBACK

Error related to media playback.

MEDIAKEYS

Error fetching the keys or decrypting the content.

NETWORK

Network error.

MANIFEST

Error loading or parsing the manifest.

HlsSegmentFormat

static

number

The format of HLS audio media segment.

Value

MPEG2_TS

MPEG2 TS format.

MPEG_AUDIO_ES

MPEG4 AUDIO ES format, i.e. raw AAC file.

PACKED_AUDIO_AC3

AC3 Packed Audio format, i.e. raw AC3 file.

MPEG_LAYER_3

MPEG1/2 Layer 3 (MP3) Audio format, i.e. raw MP3 file

TS_AAC

MPEG2 TS format with AAC codec.

PACKED_AUDIO_E_AC3

EAC3 Packed Audio format, i.e. raw EAC3 file.

FMP4

Fragmented MP4.

HlsVideoSegmentFormat

static

number

The format of HLS video segment.

Value

MPEG2_TS

MPEG2 TS format.

FMP4

Fragmented MP4.

LoggerLevel

static

number

Represents logger levels.

Value

DEBUG

Debug logging (all messages).

INFO

Info logging (events, general logs).

WARNING

Warning logging (potential problems).

ERROR

Error logging (errors).

NONE

No logging.

StreamingProtocolType

static

number

The streaming protocol types.

Value

UNKNOWN

Unknown streaming protocol type.

MPEG_DASH

MPEG-DASH (Dynamic Adaptive Streaming over HTTP) protocol type.

HLS

HLS (Http Live Streaming) protocol type.

SMOOTH_STREAMING

Smooth Streaming protocol type.

Properties

CaptionsType

static

string

Captions type. If a captions type is encountered outside of this list, MPL will still fetch the data but not parse it. The raw data must be handled by the host application via the processSegment callback and is ultimately responsible for displaying it.

Value

UNKNOWN

Unknown closed captioning.

WEBVTT

Web video text track format.

TTML

Timed text markup language.

CEA608

CEA-608 closed captioning.

STPP

SMPTE Timed text markup language.

ContentProtection

static

string

Content protection type.

Value

NONE

No content protection.

CLEARKEY

Clearkey system.

PLAYREADY

PlayReady DRM.

WIDEVINE

Widevine DRM.

ErrorCode

static

number

Errors that can be reported by the player to the host.

Value

UNKNOWN

Unknown player error.

PLAYBACK

Error related to media playback.

MEDIAKEYS

Error fetching the keys or decrypting the content.

NETWORK

Network error.

MANIFEST

Error loading or parsing the manifest.

HlsSegmentFormat

static

number

The format of HLS audio media segment.

Value

MPEG2_TS

MPEG2 TS format.

MPEG_AUDIO_ES

MPEG4 AUDIO ES format, i.e. raw AAC file.

PACKED_AUDIO_AC3

AC3 Packed Audio format, i.e. raw AC3 file.

MPEG_LAYER_3

MPEG1/2 Layer 3 (MP3) Audio format, i.e. raw MP3 file

TS_AAC

MPEG2 TS format with AAC codec.

PACKED_AUDIO_E_AC3

EAC3 Packed Audio format, i.e. raw EAC3 file.

FMP4

Fragmented MP4.

HlsVideoSegmentFormat

static

number

The format of HLS video segment.

Value

MPEG2_TS

MPEG2 TS format.

FMP4

Fragmented MP4.

LoggerLevel

static

number

Represents logger levels.

Value

DEBUG

Debug logging (all messages).

INFO

Info logging (events, general logs).

WARNING

Warning logging (potential problems).

ERROR

Error logging (errors).

NONE

No logging.

StreamingProtocolType

static

number

The streaming protocol types.

Value

UNKNOWN

Unknown streaming protocol type.

MPEG_DASH

MPEG-DASH (Dynamic Adaptive Streaming over HTTP) protocol type.

HLS

HLS (Http Live Streaming) protocol type.

SMOOTH_STREAMING

Smooth Streaming protocol type.

VERSION

static

string

Version of the cast media player library.

Methods

CreateDashStreamingProtocol

static

CreateDashStreamingProtocol(host) returns player.StreamingProtocol

Returns MPEG-DASH streaming protocol implementation.

Parameter

host

cast.player.api.Host

Application host.

Value must not be null.

Returns

non-null player.StreamingProtocol Streaming protocol.

CreateHlsStreamingProtocol

static

CreateHlsStreamingProtocol(host, audioFormat, videoFormat) returns player.StreamingProtocol

Returns HLS streaming protocol implementation.

Parameter

host

cast.player.api.Host

Application host.

Value must not be null.

audioFormat

Optional

cast.player.api.HlsSegmentFormat

The format of audio segments. In case audio and video are muxed, default value is cast.player.api.HlsSegmentFormat.MPEG2_TS. Otherwise, default value is cast.player.api.HlsSegmentFormat.MPEG_AUDIO_ES.

Value must not be null.

videoFormat

Optional

cast.player.api.HlsVideoSegmentFormat

The format of video segments. Default value is cast.player.api.HlsVideoSegmentFormat.MPEG2_TS.

Value must not be null.

Returns

non-null player.StreamingProtocol Streaming protocol.

CreateSmoothStreamingProtocol

static

CreateSmoothStreamingProtocol(host) returns player.StreamingProtocol

Returns Smooth Streaming streaming protocol implementation.

Parameter

host

cast.player.api.Host

Application host.

Value must not be null.

Returns

non-null player.StreamingProtocol Streaming protocol.

setLoggerLevel

static

setLoggerLevel(level)

Sets logging verbosity level.

Parameter

level

cast.player.api.LoggerLevel

The logging level.

Value must not be null.