/ Published in: JavaScript
When logged in with the Affiliate admin account, the media play page will have a link to download the original media. The link is is displayed at the bottom of the media description, just above the admin tags field.
Thanks to KickApps for their assistance with this code.
Updated for changes to KickApps page code
Thanks to KickApps for their assistance with this code.
Updated for changes to KickApps page code
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
if (Ka.Info.PAGE == 'pages/mediaPlayPage.jsp' && (DWRUtil.getValue('userRole') == 'WEBMASTER' || DWRUtil.getValue('userRole') == 'EDITOR')) { if (Ka.Info.MEDIATYPE == 'VIDEO') { var links = '<br><a href="' + Ka.Info.PATHTOMEDIA + '">mp4 format (transcoded)</a><br>'; // KickApps renames the media extension to lower case extension, but Ka.Info retains the case of the original upload // So we must convert to lower to correct it here links += '<a href="' + Ka.Info.STATICSERVER + '/kickapps/images/videos/' + Ka.Info.MEDIAID + Ka.Info.ORIGVIDEOFORMAT.toLowerCase() + '">Original upload</a><br>'; } else if (Ka.Info.MEDIATYPE == 'AUDIO') { var links = '<br><a href="' + Ka.Info.AUDIOPHOTOSERVERPATH + Ka.Info.PATHTOMEDIA + '">mp3 format</a><br>'; } document.getElementById("ka_playPageDetails").innerHTML = document.getElementById("ka_playPageDetails").innerHTML + links; }