Introduction & Setup

The API allows you to control, and get information about, media playback and the player itself.

Enable the JS API

All you need to do to enable the JavaScript API is include the vzaar library before the closing </body> tag on your website:

<script src="https://player.vzaar.com/libs/flashtakt/client.js" type="text/javascript"></script>

Quickstart

To use the JS API, instantiate a vzPlayer object by passing it the ID of a video's iframe, then wrap your code in an anonymous function passed to the ready() function, like so:

// Pass the ID of your video's iframe
var vzp = new vzPlayer("vzvd-10355742");

// Ensure the video is ready to accept commands
vzp.ready(function() {
  // Your code
});

πŸ“˜

NOTE

The JS API relies on the id and name attributes in the iframe to be the same (e.g. vzvd-1234567) and changing either may result in unexpected behavior.