Old 22nd September 2014, 20:57   #1
gillesc
Junior Member
 
Join Date: Sep 2014
Posts: 2
Need to refresh browser when stream source changes

hi,
im new to shoutcast and just got it up and running. I'm using a html5 audio player to play the stream. But everytime the source of the stream changes everyone has to refresh the page. What's causing this problem and how can i fix it?
gillesc is offline   Reply With Quote
Old 22nd September 2014, 21:04   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
it's because the audio stream is suddenly broken and when that happens, it's very likely that client player will have an incomplete audio frame &/or decide to drop the connection (as a source going away will generally lead to clients disconnecting).

without knowing the version of the DNAS you're using, how well it can or cannot cope with such a scenario is hard to say (though the current release - 2.4 - will do more than has been done by prior releases to try to keep things correctly frame sync'd i.e. it'll try to avoid sending incomplete audio to the client).

additionally you can look to provide a 'backupfile' (which needs to be in the same format and bitrate as the stream) or a 'backupurl' (which points to another stream) and use that to try to keep the stream alive. though with 'backupfile', if the source comes back then clients currently (with any DNAS version) will need to reconnect.


so simple summary: it's expected when you cut off the audio mid-frame and that web clients will generally struggle to recover, hence needing a refresh / restart of it. and the newer the DNAS, the better it should be able to cope with such things, but there's still some way to go.
DrO is offline   Reply With Quote
Old 23rd September 2014, 17:00   #3
gillesc
Junior Member
 
Join Date: Sep 2014
Posts: 2
I am using the latest version. When the source is disconnected i can see that the server automaticly rejects clients after around 30seconds. Is there any way to disable that, or would that even solve the problem?

And for some reason one of my friends doesn't need to refresh, only him though.
gillesc is offline   Reply With Quote
Old 23rd September 2014, 17:15   #4
DrO
 
Join Date: Sep 2003
Posts: 27,873
there are options to help control the timeouts (see the documentation included with the DNAS for timeouts), but if the audio stream is broken, then a lot of those clients are going to need to reconnect anyway as they will have either stopped or cannot recover (both due to incomplete audio data being received).

there's a few things which can be done to try to help with such an issue within the DNAS (i.e. more coding is needed), but it's never going to be 100% possible to keep the stream working correctly when it's broken off due to a source disconnect and reconnect.

as for the client that works ok, you'd need to find out what he's using, but it sounds like it's a dedicated client which can cope with things better than web-based clients (as i've already mentioned).
DrO is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump