new EmpDashif( [options] [, ready])
HTML5 Dash Media Controller - Wrapper for HTML5 Media API using MPEG-Dash 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 HTML5 media is supported.
- False if HTML5 media is not supported.
- Type
- boolean
- True if HTML5 media is supported.
-
autoplay()
-
autoplay
Returns:
autoplay
- Type
- boolean
-
baseCurrentTime()
-
Get or the raw current time (in seconds) from the video element
NOTE: It's the raw currentTime from the video element
Returns:
- the current time in seconds when getting
- Type
- number
-
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>
-
canRestart()
-
Returns true if the playback can be restarted
Returns:
canRestart
- Type
- boolean
-
currentTime()
-
currentTime
The time at which the video is currently playing
Returns:
Current time in seconds
- Type
- number
-
disableTimeShift(disable)
-
Disables timeshifting for livestreams
Setting this to true, hides the player progress controlbar
Parameters:
Name Type Description disable
boolean -
duration()
-
Duration
Total length of the video
Returns:
The duration of the video 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
-
liveDelay()
-
liveDelay
Returns:
liveDelay
- Type
- number
-
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 the tech by removing all sources and then calling
Html5.resetMediaElement. -
setAbsoluteTime(value)
-
Set the playheadTime as a Date
Parameters:
Name Type Description value
Date -
setAutoplay(autoplay)
-
setAutoplay
Parameters:
Name Type Description autoplay
boolean - True indicates that the media should start as soon as the page loads.
- False indicates that the media should not start as soon as the page loads.
- True indicates that the media should start as soon as the page loads.
-
setMaxBitrate(bitrate)
-
Set max bitrate
Setting this to NaN will clear the max bitrate
Parameters:
Name Type Description bitrate
number in kbps
-
startTimeLive()
-
The unix time (ms) when stream was started
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