Can be a string or an object containing url and mimetype
OptionalmimeType: string
Optional parameter denoting the mime-type of stream
Disables the overlay when casting on Chromecast
For dispatching events on player from outside of this file
Optionalpayload: anyExits Picture-in-Picture when document.pictureInPictureEnabled is true.
Returns the acive video handler used by the player
Returns the active handler being used by the player
Returns the current buffer size from the handler
Returns an array of audio tracks available containing : - index, label, language and enabled information
Returns whether the autoplay overlay has been shown
Returns the bandwidth used by player to load the fragment, if available
Returns the browser's autoplay policy status (allowed/not allowed)
Returns the index of the active audio track. Returns 1 if no alternative audio tracks
Return the current playing frame in the video stream
Returns current playback rate of the video stream.
Note: Always returns 1 if playback rate switch is disabled.
Returns current program datettime value in string(for hls streams, if available)
Returns the index of the active quality level
Returns the current playback time of the stream.
Time in seconds
Returns player's current height and width in pixels
Returns the next quality index (current quality index + 1), if player not playing the highest bitrate
Returns the duration of the stream.
Time in seconds
Returns current frames per second of the stream, if available
Returns number of dropped frames
Returns instance of handler created, if available
Returns the video and audio codec information, if available
Gets the live edge value of the stream.
The live edge value, or null if the handler is not set.
Returns the video and audio codec information, if available
Returns current segment that is being played - applicable for DASH and HLS
Returns an array of available quality levels of the video
Returns an array of requested segments - applicable for DASH and HLS
Returns resolution of the video being played back
Return image data of the snapshot taken from video frame
Width of the snapshot image
Height of the snapshot image
Returns title of the player
Returns the buffer time set into player by config
Returns current version of the player
Returns the HTMLVideoElement used by the player
Returns 1 if 50% of the player is in view and is in the active tab, 0 otherwise
Returns the volume of the audio in the stream
Seek to particular frame number in the video stream
Frame number to which the player should seek to
Seek to next frame in the video stream
Seek back to previous frame in the video stream
Toggles Picture-in-Picture when document.pictureInPictureEnabled is true.
If the video element is already in Picture-in-Picture mode, it exits Picture-in-Picture mode.
Returns true if player is rendered in full screen, false otherwise
Returns true if the stream has multiple video playback qualities, false otherwise
Returns the mute state of the stream loaded in the player
Return if the videplayer is in paused state
Checks if the user is idle on screen.
Returns true if the user is idle, false otherwise.
Returns false for live streams, true otherwise
Tries to load the stream with any of the handlers.
url: "https://example.com/stream.m3u8"
(or)
url: {
standard: "https://example.com/standardStream.m3u8",
augmented: "https://example.com/augmentedStream.mpd"
}
May be called immediately after setupPlayer(); if the player is not ready yet, the request is queued and applied when handlers are registered ("loaded").
Stream url string or object containing multiple stream feed
Optionaloptions: PlayerLoadOptions
(Optional)
Stop listening to the event
The name of the event to remove the listener for.
Optionalcallback: (payload?: any) => void
An optional callback function to be executed after removing the listener.
The result of the operation.
Adds an event listener for the specified event name.
The name of the event to listen for.
Optionalcallback: (payload?: any) => void
An optional callback function to be executed when the event is triggered.
The result of the event listener registration.
Adds a one-time listener function for the specified event.
The name of the event to listen for.
Optionalcallback: (payload?: any) => void
An optional callback function to be executed when the event is triggered.
Returns null.
Pause Ad while one is playing
Pauses the video loaded into the player
Plays the video loaded into the player
Removes the player. Ensures player stops playback and DOM is cleared up
Remove all events from handler
Video will be reset to its original size
Stop listening to the event and listen right back to it with the specified event name and callback function.
The name of the event to resubscribe to.
Optionalcallback: (payload?: any) => void
An optional callback function to be executed when the event is triggered.
Resume Ad when it is in paused state
Seeks to the specified progream Datetime during runtime(for hls streams, if available)
ProgramDateTime to seek to, format: "2019-02-19T14:54:23.031+08:00"
Sets the flag indicating the autoplay overlay has been shown
Sets the browser's autoplay policy status
Change the audio track to the track provided in the given index
Change the quality level to the bitrate provided in the given index
The index of the quality to set.
Sets the current playback time of the stream.
Time in seconds
Video will be ended at the specified time passed the parameter
Time in seconds at which the video must end
Sets the element on which fullscreen must be applied
Sets / Toggles mute state of the stream loaded in the player
OptionalisMuted: boolean
is optional - If not set, the player simply toggles the mute state
Set player config options
Sets the playback rate of the stream to the value passed.
Speed at which video must stream (> 0)
Possible to set the rate only if enablePlaybackRate is set to true in config.
Note: Only valid for VOD streams and non-flash streams.
Video will be shrinked to the perecentage passed as paramter
Percentage in number to which the size of video must be shrinked to
Set volume of the audio in the stream
Volume to be set on the player between 0-100
Shows/hides timeline markers when enabled via API
Stops the video loaded into the player
Toggles the fullscreen mode of the video player.
Optionalelem: HTMLElement
The HTML element to toggle fullscreen on. If not provided, the player's wrapper element will be used.
Toggles the play/pause state of the player.
A boolean indicating whether the player is currently playing.
Reload the external overlay contents set via config htmlOverlay
Optionalhtml: stringOptionalcss: string
Returns true if player can handle media by any of the handlers, false if not.