Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does HTML5 audio tag support serving mp3s from another domain?

So I am having a web application with domian "www.example.com" that needs to serve audio from "www.example2.com", but for some reason this is not working (the audio just does not stream)

<audio src="http://www.example2.com/song.mp3" controls preload></audio>

Given that if I put the sound source url directly into the browser the audio will be available

Anyone tried this? thanks

Wa'el

like image 354
wael34218 Avatar asked Dec 14 '10 20:12

wael34218


1 Answers

Apparently I cannot vote up CyberK's response (don't have the reputation yet to do so) but I agree with him. You cannot do <audio> or <video> cross-domain. I have tried this exact thing on both Chrome and Firefox. There are more than a couple of articles about this. Finding this out for myself today; not happy with the restriction.

http://www.bluishcoder.co.nz/2008/11/video-audio-and-cross-domain-usage.html

like image 172
Ryan Avatar answered Oct 10 '22 01:10

Ryan