Skip to main content

Prerequisites

Remote Control

Remote control methods allow you to programmatically control the video player, including play, pause, seek, and fullscreen actions.
playerInstance.play()
function
Start or resume playback of the video
playerInstance.pause()
function
Pause the video playback
playerInstance.seek(time)
function
Jump to a specific time in the video (time in seconds)
playerInstance.fullscreen()
function
Toggle fullscreen mode on or off
playerInstance.destroy()
function
Destroy player instance and attached media element

Events

playerInstance.on/off
function
You can attach or remove event listeners on the player instance using .on(event, callback) or .off(event, callback)
event
string
callback
function
Function called when the event is triggered, receives event data as argument
Example
playerInstance.on("time", function(data) => {
  console.log("time is ", data.currentTime)
});