I tried to use this to play the sound and It did not work. Where did I go wrong???
"function playSound(url) {
var a = new Audio(url);
a.play();
}"
minus the quotes of course.
I tried to use this to play the sound and It did not work. Where did I go wrong???
"function playSound(url) {
var a = new Audio(url);
a.play();
}"
minus the quotes of course.
What URL did you use?
I used the URL that soundcloud automatically generates for you when you upload a sound. I cant share it here because i do NOT want it to be shareable I just want it to be used in my app and no where else.
I used the direct link and the embed one that soundcloud generates for your sound after uploading it to their site.
I don't know in what format the SoundCloud URL is, if it's not in one of the formats I listed above, it probably won't work. Plus, it requires authentication.
You should ask SoundCloud support whether it's possible to play their link using the standard HTML5 audio tag.