' , tracks: [{ file: '/e/getsub.php?linksub=vpornex.com', label: 'English', kind: 'captions', "default":true }], captions: { color: '#FFFFFF', fontSize: 20, backgroundOpacity: 20 }, }); playerInstance.addButton( //This portion is what designates the graphic used for the button "//i.imgur.com/cAHz5k9.png", "Download Video", function() { var kI = playerInstance.getPlaylistItem(), kcQ = playerInstance.getCurrentQuality(); if(kcQ < 0) { kcQ =0;} //var kF = kI.sources[kcQ].file+"?itag="+kcQ+"&type=video/mp4&title=GoogleVideoName"; //console.log(kF); if(kI.sources[kcQ].file.lastIndexOf('redirector.googlevideo.com') > 0) { var kF = kI.sources[kcQ].file+"&title=GoogleVideoName"; } window.open(kF,'_blank'); }, "download" );