Play music from link

Discussion and feedback on Construct 2

Post » Fri Feb 01, 2013 11:23 am

Interesting. Wonder if the audio tag could be adapted to connect to a stream. In game radio might be a unique feature for some games.
B
26
S
8
G
3
Posts: 210
Reputation: 5,973

Post » Fri Feb 01, 2013 12:16 pm

@theubie Looks like you can
http://www.wowza.com/forums/showthread.php?14071-Streaming-to-HTML5-audio-tag

EDIT: You would need a webradio that streams both ogg and mp3 though for browser compatibility...

Here is stream that works in Firefox and Chrome for example (Div plugin):
On start of layout -> Set innerHTML to:
"<audio controls autoplay src='http://radio.goha.ru:8000/grindfm.ogg' type='audio/ogg'>"lemo2013-02-01 12:58:20
B
20
S
5
G
8
Posts: 325
Reputation: 6,473

Post » Fri Feb 01, 2013 3:26 pm

Just want to point out use of MP3 can incur a fee of $2500. You should never even think about using MP3; just go for AAC instead (aka MP4 or MPEG-4 AAC), which is better than MP3 and doesn't have any fees!Ashley2013-02-01 15:26:54
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Fri Feb 01, 2013 4:43 pm

@Ashley Thx for the advice
Just tested this method and the audio tag with Safari and m4a and it works indeed^^
I simply followed the compatibility page I linked above (weird that they don't even list aac), but I guess it just works like usual C2 audio then, back to ogg/m4a!

(btw your chart has lost its content apparently)
B
20
S
5
G
8
Posts: 325
Reputation: 6,473

Post » Fri Feb 01, 2013 7:41 pm

Having worked in the Broadcast industry, I can spend hours and hours going over the finer points of online music licensing...luckily that's not something that most people would have to deal with.

Most of the really good streaming servers offer ogg/m4a, so that wouldn't be an issue at all for use in an online game.

I've got half a mind to put my internet radio station back on the air, and if I do, I'm going to integrate the stream into the major project I'm working on, assuming I can find a reasonable way to make all this work. ;)
B
26
S
8
G
3
Posts: 210
Reputation: 5,973

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: Eisenhans and 5 guests