Remove an event listener for the specified event.
If callback is not provided, all listeners for the event will be removed.
See PlayerEvents for a list of available events and their correspondent data.
The name of the event.
Optional
callback: EventCallback<PlayerEvents[K]>The event callback to remove.
Add an event listener for the specified event.
See PlayerEvents for a list of available events and their correspondent data.
The name of the event.
The event callback.
Plays the video if it’s paused.
A promise that resolves when the video is playing.
In some scenarios, playing unmuted video is not allowed. See Autoplay guide for media and Web Audio APIs for more info.
Sets the analytics mode. By default, the player uses the 'minimal' mode.
The analytics mode to set.
Sets the player's colors.
The color settings to override. If a color is not provided, the player will use the color defined in the Player Configuration (in VideoManager Pro).
A promise that resolves when the color settings are applied.
Create a new Player SDK instance, and connect it to the movingimage embedded player. If options are provided, it will create a new embedded player inside the element.
The id or iframe HTML element, to bind the SDK to. If options are provided, this should be the parent element instead.
Optional
options: PlayerParametersOptional parameters to create the embedded player.
To use the SDK, create a new instance of the Player class.
This class contains all the methods and events to interact with the embedded movingimage player.
Example
Given the following embedded movingimage player iframe in your page:
You can initialize the player SDK like this:
Then you can use the player object to interact with the embedded video player. For example: