I'm using Jquery's GET method to dynamically retrieve a recording and insert it in a element like this :
$.get("getrecording.php", function (data) { var audio = "<audio onended='finiAudio()' src='"+data+"' id='mp3' preload='none'></audio>"; $('#somediv').append(audio); });If I'm checking the src url with Firebug, or just doing an alert on the SRC attribute, I get the proper URL : http://testing.com/recording/call/REa989b3de9edf2c270c20007251268969.mp3
However, if I try to play the audio file with the javascript play() function, I get the following error :
"NetworkError: 404 Not Found - http://testing.com/plateforme/%EF%BB%BF%EF%BB%BF%EF%BB%BF%EF%BB%BF%EF%BB%BF%EF%BB%BF%EF%BB%BFhttp://www.testing.com/recording/call/REa989b3de9edf2c270c20007251268969.mp3"
/plateforme/ is the folder from where I'm running the script. I do not understand why it keep adding strange characters like "%BB%BF%. If I do the whole thing using PHP only, it's working fine.
Any ideas ? It's been driving me crazy for hours.
Thanks !