[Icecast] Question about Icecast2 when not streaming
José Luis Artuch
artuch at speedy.com.ar
Wed Jun 3 12:10:31 UTC 2015
El mar, 02-06-2015 a las 21:48 -0400, Kyle Blizzard escribió:
> Hello.
>
> I've been using Icecast for a few days now, and am really enjoying
> it. One thing I can't figure out how to do is have a specific file
> play if someone were to click on my stream url, and I wasn't actively
> streaming at the time. I want it to play if I'm not streaming, but
> play the stream if I am. I'm not sure if this is possible; I've
> searched the Icecast
> site and forums and didn't see anything about it, but I've seen other
> people do something similar. Is it possible to do this?
>
> Thanks for any information you may be able to provide.
Hello Kyle,
If you want that the listener always receive audio from your *Web site*,
whether or not your *Icecast server* is running, you can include an
onclick event on your stream url, so, if your *Icecast server* is not
running, a song hosted in your *Web server* will be played:
document.getElementById('idYourStreamUrlButton').onclick=function(){if(icecastIsRunning){playYourIcecast}else{playYourSong}}
José Luis
> _______________________________________________
> Icecast mailing list
> Icecast at xiph.org
> http://lists.xiph.org/mailman/listinfo/icecast
More information about the Icecast
mailing list