Page History
Section | ||||||||
---|---|---|---|---|---|---|---|---|
|
Start video
Anchor | ||||
---|---|---|---|---|
|
Panel | ||||
---|---|---|---|---|
| ||||
Play |
Begin playing the video at the (optionally
) specified time.
Code Block | |
---|---|
|
| |
player |
.play(time); |
Parameter | Data Type | Description |
---|---|---|
time | integer |
default = null
optional: |
the video should begin playing |
from this time (in seconds) default = null |
Anchor | ||||
---|---|---|---|---|
|
Panel | ||||
---|---|---|---|---|
| ||||
Pause |
Pauses
the video; there is no effect if the
Player is already paused.
Code Block | |
---|---|
|
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Player.pause() |
Stop video
| |
player.pause(); |
Anchor | ||||
---|---|---|---|---|
|
Panel | ||||
---|---|---|---|---|
| ||||
Stop |
Stops the video;
no effect if the
Player is already stopped.
Code Block |
---|
|
| |
player |
.stop(); |
Set volume
Adjusts volume level in the scale values from 0.0, 0.1, 0.2, ... 1.Anchor | ||||
---|---|---|---|---|
|
Panel | |||
---|---|---|---|
|
|
Player.setVolume(volume)
Mute
Toggles the audio on or off.
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Player.toggleMute() |
Jump forward
Jump forward by milliseconds given.
Forward |
Fast forward the video by the number of milliseconds given.
Code Block | ||
---|---|---|
| ||
player.forward(millis); |
Parameter | Data Type | Description |
---|---|---|
millis | integer | interval in milliseconds |
Anchor | ||||
---|---|---|---|---|
|
Panel | ||||
---|---|---|---|---|
| ||||
Rewind |
Rewind the video by the number of milliseconds given.
Code Block | ||
---|---|---|
| ||
player.rewind(millis); |
bgColor | #DCDCDC |
---|---|
language | js |
theme | Confluence |
borderStyle | none |
Parameter | Data Type | Description |
---|---|---|
millis | integer |
interval in milliseconds |
Anchor |
---|
Rewind
|
Panel | |||
---|---|---|---|
|
|
Set Volume |
Sets the volume of a video to a specified level.
Code Block | ||
---|---|---|
| ||
player.setVolume(volume); |
Parameter | Data Type | Description |
---|
volume |
Interval in milliseconds.
Get current time
The current playing time in seconds will be returned.
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Player.getCurrentTime() |
Get video length
Returns the video length of the current video.
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Player.getDuration() |
Get buffered time of video
Returns how far the video has been already buffered.
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Player.getBufferedTime() |
float | level to set the volume of the video to (range from 0.0 to 1.0 with a step size of 0.1) |
Anchor | ||||
---|---|---|---|---|
|
Panel | ||||
---|---|---|---|---|
| ||||
Toggle Mute |
Toggles the audio on or off.
Code Block | ||
---|---|---|
| ||
player.toggleMute(); |
Anchor | ||||
---|---|---|---|---|
|
Panel | ||||
---|---|---|---|---|
| ||||
Get Current Time |
Returns the current video time in seconds.
Code Block | ||
---|---|---|
| ||
player.getCurrentTime(); |
Anchor | ||||
---|---|---|---|---|
|
Panel | ||||
---|---|---|---|---|
| ||||
Get Duration |
Returns the duration of the current video in seconds.
Code Block | ||
---|---|---|
| ||
player.getDuration(); |
Anchor | ||||
---|---|---|---|---|
|
Panel | ||||
---|---|---|---|---|
| ||||
Get Buffered Time |
Returns the total time of the video that has been buffered in seconds.
Code Block | ||
---|---|---|
| ||
player.getBufferedTime(); |
Anchor | ||||
---|---|---|---|---|
|
Panel | ||||
---|---|---|---|---|
| ||||
Get Video Title |
Returns the title of the current video.
Code Block |
---|
|
| |
player.getApi( |
"metadata").getVideoTitle(); |
Anchor | ||||
---|---|---|---|---|
|
Panel | ||
---|---|---|
|
| ||
Switch Video |
Load a video specified by ID.
Code Block |
---|
|
|
player.switchVideo(videoId); |
Parameter | Data Type | Description |
---|---|---|
videoId | string | ID of the video to be loaded |