Page 1 of 1

Playing Remote MP3 File

Posted: Wed Jun 18, 2014 5:16 pm
by Rom

Hello,

I'm having some difficulty playing remote MP3 file.
The URL of remote MP3 file is stored in a variable called "songDirectLink" and I've linked it with CLICK event so that every time list item is clicked, new song loads in the audio player.

I'm using the below code:

var url = localStorage.getItem("songDirectLink");
alert(url);
Appery("audioPlayer").attr("src", "url");
Appery("audioPlayer").trigger("play");

The alert, which I just created to test the variable value outputs right URLs. However, player doesn't load the remote file, but if I manually insert URL of remote MP3 instead of choose var "url", player works fine.

Please help!


Playing Remote MP3 File

Posted: Wed Jun 18, 2014 7:35 pm
by Kateryna Grynko