Adding a Download Button

This demo shows you how to allow users to easily download a video file.

License: All
Player Version:
Author: JW Player | GitHub
This demo includes:
  • addButton()
<script type="text/javascript">

var player = jwplayer('player');

  playlist: ''

  //This portion is what designates the graphic used for the button
  //This portion determines the text that appears as a tooltip
  "Download Video",
  //This portion designates the functionality of the button itself
  function() {
    //With the below code, we're grabbing the file that's currently playing
    window.location.href = player.getPlaylistItem()['file'];
  //And finally, here we set the unique ID of the button itself.

Please Note: This player implementation is a Proof of Concept only provided to show the possibilities of the JW Player and Platform and should not be taken as an offer to create, edit or maintain custom integration or development.