
Help Adding Button
Hi,
I'm trying to add a download button to out player without success. The code for the player on our page is:
<script src="//content.jwplatform.com/players/l9aqB9m4-7l7ZMsAW.js"></script>
<script>
When I tried to add the download button based off the example page it just doesn't show.
<script src="//content.jwplatform.com/players/l9aqB9m4-7l7ZMsAW.js"></script>
<script>
playerInstance.addButton(
//This portion is what designates the graphic used for the button
"https://dl.dropboxusercontent.com/u/53823971/temp_images/icon_download.png",
//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 = playerInstance.getPlaylistItem()['file'];
},
//And finally, here we set the unique ID of the button itself.
"download"
);
</script>
I just can't figure it out. Any help is appreciated.