Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

JavaScript Playlist in the JW Embedder

If you're using the JW Embedder and would like to define a playlist that works in both Flash and HTML5 modes, you will need to define your playlist in your JavaScript embed code. To do this, you'll need to add a playlist block to your setup configuration:

  playlist: [
    { file: '/videos/video_1.mp4', image: '/thumbs/video_1_thumb.jpg' },
    { file: '/videos/video_2.mp4', image: '/thumbs/video_2_thumb.jpg' },
    { file: '/videos/video_3.mp4', image: '/thumbs/video_3_thumb.jpg' }
  ]

The playlist block is an array, and each of the sub-items contains a file property. Additionally, these items may include any of the playlist properties, such as image, provider, etc.

The following example shows a 3-item playlist containing videos streamed via RTMP.