Add mp3 download link to audio player


WonderPlugin Audio Player


How can I add download links to the player so my visitor can download the mp3 file?


You can add download links to the player track list.

In the plugin, step 2 Skins dialog, please choose a skin that has a track list, then in step 3, Options tab, click the Advanced Options button, enter the following text to the Advanced Options field:

data-tracklistitemformat="%ID%. %TITLE% <span style='float:right;'><a href='%AUDIOURL%' class='wpaudiodownloadlink' download='%TITLE%.mp3' target='_blank' onclick='event.stopPropagation();'>Right Click to Save</a></span>"

In the above code, %ID%, %TITLE% and %AUDIOURL% are predefined macro variables. They will be replaced by each audio id, title and audio URL dynamically.

Please note, the HTML download attribute does not work in Safari at the moment. In Safari, if you directly click the link, instead of downloading the mp3 file, it will open and play the mp3.

To download the mp3 file, you could ask your users to right click on the link, and select "Download Linked File" from the context menu.