new EmpHLS( [options] [, ready])
HTML5 HLS 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> getKeySystem()
-
Get Key System for HLS
Returns:
KeySystem
- Type
- string
-
<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
- True if HLS media is supported.
-
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 insteadParameters:
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)
-
Disables timeshifting for livestreams
Setting this to true, hides the player progress controlbar
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
-
live()
-
Is current playback live or not?
Returns:
whether or not current playback is live
- Type
- boolean
-
pause()
-
pause playback
-
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 -
startTimeLive(nowDate)
-
The unix time (ms) when stream was started
Parameters:
Name Type Description nowDate
number Returns:
Start Time Live
- Type
- number
-
stop( [afterStopCallback])
-
Stop playback
Parameters:
Name Type Argument Description afterStopCallback
function <optional>
-
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