Class: EmpHlsMse

empHlsMse~ EmpHlsMse


new EmpHlsMse( [options] [, ready])

HTML5 HLS MSE Media Controller - Wrapper for HTML5 Media API using MPEG playback

Parameters:
Name Type Argument Description
options Object <optional>

The key/value store of tech options.

ready function <optional>

Ready callback function

Extends

  • videojs.Html5

Members


<static> entitlementPlayRequest

Return the object presentation of the play-request required for the entitlement engine


<static> log

Get EMP log object


<static> nativeSourceHandler

Define source handler options.

These options check whether or not we can playback the source object.


streamType

Get StreamType (DASH OR HLS)

Methods


<static> isSupported()

Check if Dash media is supported by this browser/device.

Returns:
  • True if HLS media is supported.
    - False if HLS media is not supported.
Type
boolean

bitrate(value)

Get/Set bitrate

Will return a bitrate equal to the current video bitrate. However if ABR is enabled will return 0 to indicate a non-fixed bitrate.

Setting this value disable dynamic switching, and fixes the bitrate as specified.
To set a ceiling, but allow it to dynamically switch quality when
able use setMaxBitrate instead

Parameters:
Name Type Default Description
value number null

Bitrate to set. 0 to 'reset' back to ABR

Throws:

TypeError Invalid bitrate specified.

Returns:

bitrate when getting

Type
number

bitrates()

Returns a list of available bitrates

Returns:

) Array of available bitrates

Type
Array.<number>

buffered()

Determine buffer Range in player

Returns:

the buffered intervals of the media timeline

Type
TimeRanges

canRestart()

Returns true if the playback can be restarted

Returns:

canRestart

Type
boolean

currentTime()

Get the current time (in seconds) for the program or video

Returns:
  • the current time in seconds when getting
Type
number

disableTimeShift(disabled)

disableTimeShift

Parameters:
Name Type Description
disabled boolean

duration()

Get duration

Returns:

duration in seconds

Type
number

getAbsoluteTime( [nowDate])

Get the playheadTime as a Date

Parameters:
Name Type Argument Description
nowDate number <optional>
Returns:

playheadTime

Type
Date

getBitrate()

Get current bitrate

Always returns the current bitrate, unlike bitrate() which returns 0 if ABR is enabled

Returns:

bitrate

Type
number

getMaxBitrate()

Get bitrate

Returns:

bitrate in kbps

Type
number

gotoLive()

gotoLive


live()

Is current playback live or not?

Returns:

whether or not current playback is live

Type
boolean

onError( [event])

onError

Parameters:
Name Type Argument Description
event EventTarget~Event <optional>

Event object


pause()

Overide pause()


play()

Attempt to begin playback at the first opportunity.

Returns:

Returns a promise if the browser supports Promises (or one
was passed in as an option). This promise will be resolved on
the return value of play. If this is undefined it will fulfill the
promise chain otherwise the promise chain will be fulfilled when
the promise from play is fulfilled.

Type
Promise | undefined

reset()

reset


setAbsoluteTime(value)

Set the playheadTime as a Date

Parameters:
Name Type Description
value Date

setMaxBitrate(bitrate)

Set max bitrate

Setting this to NaN will clear the max bitrate

Parameters:
Name Type Description
bitrate number

in kbps


startTimeLive(nowDate)

The unix time (ms) when stream was started

Parameters:
Name Type Description
nowDate number
Returns:

Start Time Live

Type
number

techVersion()

get techVersion

Returns:

techVersion

Type
string

timeBehindLive()

seconds behinde live edge

Returns:

timeBehindLive

Type
number

timeShiftEnabled()

Get timeShiftEnabled

Returns:

if timeShift is enabled

Type
boolean

Class: EmpHlsMse

empHlsMse~ EmpHlsMse


new EmpHlsMse( [options] [, ready])

Create a EmpHlsMse tech object

Parameters:
Name Type Argument Description
options Object <optional>

The key/value store of tech options.

ready function <optional>

Ready callback function

Members


<static> entitlementPlayRequest

Return the object presentation of the play-request required for the entitlement engine


<static> log

Get EMP log object


<static> nativeSourceHandler

Define source handler options.

These options check whether or not we can playback the source object.


streamType

Get StreamType (DASH OR HLS)

Methods


<static> isSupported()

Check if Dash media is supported by this browser/device.

Returns:
  • True if HLS media is supported.
    - False if HLS media is not supported.
Type
boolean

bitrate(value)

Get/Set bitrate

Will return a bitrate equal to the current video bitrate. However if ABR is enabled will return 0 to indicate a non-fixed bitrate.

Setting this value disable dynamic switching, and fixes the bitrate as specified.
To set a ceiling, but allow it to dynamically switch quality when
able use setMaxBitrate instead

Parameters:
Name Type Default Description
value number null

Bitrate to set. 0 to 'reset' back to ABR

Throws:

TypeError Invalid bitrate specified.

Returns:

bitrate when getting

Type
number

bitrates()

Returns a list of available bitrates

Returns:

) Array of available bitrates

Type
Array.<number>

buffered()

Determine buffer Range in player

Returns:

the buffered intervals of the media timeline

Type
TimeRanges

canRestart()

Returns true if the playback can be restarted

Returns:

canRestart

Type
boolean

currentTime()

Get the current time (in seconds) for the program or video

Returns:
  • the current time in seconds when getting
Type
number

disableTimeShift(disabled)

disableTimeShift

Parameters:
Name Type Description
disabled boolean

duration()

Get duration

Returns:

duration in seconds

Type
number

getAbsoluteTime( [nowDate])

Get the playheadTime as a Date

Parameters:
Name Type Argument Description
nowDate number <optional>
Returns:

playheadTime

Type
Date

getBitrate()

Get current bitrate

Always returns the current bitrate, unlike bitrate() which returns 0 if ABR is enabled

Returns:

bitrate

Type
number

getMaxBitrate()

Get bitrate

Returns:

bitrate in kbps

Type
number

gotoLive()

gotoLive


live()

Is current playback live or not?

Returns:

whether or not current playback is live

Type
boolean

onError( [event])

onError

Parameters:
Name Type Argument Description
event EventTarget~Event <optional>

Event object


pause()

Overide pause()


play()

Attempt to begin playback at the first opportunity.

Returns:

Returns a promise if the browser supports Promises (or one
was passed in as an option). This promise will be resolved on
the return value of play. If this is undefined it will fulfill the
promise chain otherwise the promise chain will be fulfilled when
the promise from play is fulfilled.

Type
Promise | undefined

reset()

reset


setAbsoluteTime(value)

Set the playheadTime as a Date

Parameters:
Name Type Description
value Date

setMaxBitrate(bitrate)

Set max bitrate

Setting this to NaN will clear the max bitrate

Parameters:
Name Type Description
bitrate number

in kbps


startTimeLive(nowDate)

The unix time (ms) when stream was started

Parameters:
Name Type Description
nowDate number
Returns:

Start Time Live

Type
number

techVersion()

get techVersion

Returns:

techVersion

Type
string

timeBehindLive()

seconds behinde live edge

Returns:

timeBehindLive

Type
number

timeShiftEnabled()

Get timeShiftEnabled

Returns:

if timeShift is enabled

Type
boolean