JavaScript API

Example: Mutually Exclusive Playback

Here is an example of a setup with multiple players. When one of them starts, the others are automatically paused: var options = { file: "//content.jwplatform.com/videos/bkaovAYt-I3Z...

Example: Mimicking Live TV

In this example, we'll be taking a look on how to mimic live TV! ​ If this page is refreshed, you'll notice that the video will start up right where it left off. The trick to getting this to work is w...

Example: Custom Ad Scheduling

​ This document applies to users of JW Player Enterprise. Don't have Enterprise? Upgrade Now. Here is an example of a setup of JW Player with VAST advertising client. Instead of using an ad schedule, the...

Example: Loading Videos through the API

Here is an example of a setup that uses the JavaScript API to load new videos into JW Player on the fly: #container{ display:block; margin: 20px auto; box-shadow:0 0 4px #999; } var playerInstance =...

Example: Multiple Companion Ads

Here is an example of a setup of JW Player with VAST advertising client. Using the Advertising API, we fetch a list of companions from the VAST tag and insert these into the page: This document applies to ...