I am building a website for the members of my choir. I want to use the musicplayer for the mp3 files with which we practices our songs. Besides being able to listen them directly on the (private) website, the members should be able to download the mp3 files as well. That is a problem. I would like to be able to use the 'store list' option in the playlist as a direct download. But when I put the link to the mp3 on the website there, it just opens a new window where it starts to play, instead of downloading. Is there a possibility, maybe by adding some code, that I can use this option for direct download?
This is a browser/server behavior. To avoid the automatic playing of the mp3, make sure to zip the mp3 first. The download will then be a zip file that people will be able to download.
Yeah, I understand that. But in html5 it is possible to make a not zipped mp3 (or other file) also an automatic download link, by using the 'download' code in the link. I think it should be a possibility with coding in php and html/css to make every link in the class of the musicplayer an automatic download link?
Hello,
I am building a website for the members of my choir. I want to use the musicplayer for the mp3 files with which we practices our songs. Besides being able to listen them directly on the (private) website, the members should be able to download the mp3 files as well. That is a problem. I would like to be able to use the 'store list' option in the playlist as a direct download. But when I put the link to the mp3 on the website there, it just opens a new window where it starts to play, instead of downloading. Is there a possibility, maybe by adding some code, that I can use this option for direct download?
I hope you can help out.
Best regards,
Inge
Hi there,
This is a browser/server behavior. To avoid the automatic playing of the mp3, make sure to zip the mp3 first. The download will then be a zip file that people will be able to download.
thanks
Thanks,
Max from the Sonaar.io Crew
Hi Maxime,
Yeah, I understand that. But in html5 it is possible to make a not zipped mp3 (or other file) also an automatic download link, by using the 'download' code in the link. I think it should be a possibility with coding in php and html/css to make every link in the class of the musicplayer an automatic download link?
Best regards,
Inge
Hi,
The solution you are proposing is not cross-browser compatible. https://stackoverflow.com/questions/19512847/force-download-instead-of-streaming-of-mp3-file-in-ff
The other solution is to check with your server to include a specific MIME tag. https://www.webdeveloper.com/forum/d/244007-resolved-force-download-of-mp3-file-instead-of-streaming/12
but this is beyond my expertise. I never tried it i am sorry.
Maxime
Thanks,
Max from the Sonaar.io Crew
In all updated browsers the command 'download' does work, the link you posted is a very old one. Also the link about MIME is quite outdated.
But thank you for admitting this is beyond your knowledge, I appreciate that! I will trie to find the code myself then, with help of a friend.
Im sorry, I'd like to help.
good luck.
Thanks,
Max from the Sonaar.io Crew
No problem at all, it is good to admit we dont know everything. I really like the fact that you are honest about not being able to help out!
I will work it out I guess.