Vidyard recently switched to a new user interface. Click here to compare the previous and current menu.

How to use the Vidyard Player API

The Vidyard Player API allows developers to control an embedded player via JavaScript.

Note: Refer to this article regularly for updates on the available functionality.

Note: The Vidyard platform has changed the term "Chapter" to "Video" in the platform User Interface. In the article below, where you see 'Chapter' it is referring to Videos. 

Note: API calls must be run after the script for the Player Embed has run in order to properly reference loaded content.

Note: In order to use the Player API with lightbox embeds, the lightbox must be active, and the player loaded on the page when the script runs. If the script runs without the lightbox active and the player loaded on the page the script will not run and there will be console errors. 

Player API JavaScript library

The player API JavaScript library is located at:


Referencing a Player

Players are referenced via their UUID which can be extracted from their embed code, or in the Vidyard sharing page URL.

For example:

When viewing a player at the URL, the UUID of the player is oTDMPlUv--51Th455G5u7Q.


var video = new Vidyard.player("playerUUID"); 


var videos = new Vidyard.players(); 




Start the player from the beginning
.pause()Pauses the player
.resume()Resumes playback

The player position will be changed to the desired time. The position value is the desired player position in seconds

.setVolume(volume)The player volume is set. The volume value is the desired player volume represented between 0-1.
.playChapter(index)Play the designated chapter in a player. The index value is the desired chapter beginning at 0 for the first chapter.
.getCurrentChapter()Returns the index of the current chapter.
.enableCaption(language/label)Enables captions. The language and label values allow you to specify which caption to enable. If a value is not specified then this method will enable the first caption.
.disableCaption(language/label)Disables captions. The language and label values allow you to specify which captions to disable. If a value is not specified then this method will disable all captions that are showing. 



Metadata (title, length, description, etc.) for the player is returned. This data is available after the ready even has been fired. null is returned otherwise. Below is an example of a player's available metadata:

    name: "Player name",
    length_in_seconds: 123,
    chapters_attributes: [
            video_attributes: {
                description: "Video description",
                length_in_seconds: 123,
                name: "Video name"


readyFired when the player has loaded on the web page.
playThis event fires when the play button is clicked on the player. Note: This function does not affect players when viewed on iOS devices.
pauseThis event fires when the player is paused.
beforeSeekThis event fires immediately when the viewer seeks.


This event fires when the viewer has completed a seek action to a new time in the player.
playerCompleteThis event fires when the end of the player is reached regardless of any seeking or pauses.
chapterCompleteThis event fires when the end of a chapter is reached regardless of any seeking or pauses.
timeupdateThis event fires every ~100ms.
volumeChangeThis event fires when the volume is changed.

API Usage

<script src="//"></script>
<script type="text/javascript">
  var video = new Vidyard.player("playerUUID");
  video.on("playerComplete", function() { alert("Video completed") });; 

Was this article helpful?

Can’t find what you’re looking for? Please contact us below.

Email Vidyard Support
Why you didn't like the article?
  • No, Thanks