Create an instance:
var player = new Clappr.Player({source: "http://your.video/here.mp4", parentId: "#player"});
You can use this method to attach the player to a given element
. You don't need to do this when you specify it during the player instantiation passing the parentId
param.
Plays the current source.
Pauses the current source.
Stops the current source.
The value
should be a number between 0 and 100. For example, player.seek(50)
will seek to the middle of the current source.
The value
should be a number between 0 and 100, 0 being mute and 100 the max volume.
Mute the current source.
Unmute the current source.
Returns true
if the current source is playing, otherwise returns false
.
Returns the plugin instance. Example:
var poster = player.getPlugin('poster');
poster.hidePlayButton();
This search the Core
and Container
plugins by name, and returns the first one found.
Returns the current time(in seconds) of the current source.
Returns the duration(in seconds) of the current source.
Resizes the current player canvas. The size
parameter should be a literal object with height
and width
. Example:
player.resize({height: 360, width: 640});
Destroy the current player and removes it from the DOM.
Loads a new source.