I totally agree Dopelabs, and thats why I named my website RADIO.... So when people go to my website, they expect music !! Also the player is situated in the sidebar and is Always visible and has a start/stop button.
Also in mobile devices, autoplay doesn't work. But when I choose play, the player starts checking 1st stream and when its offline it automatic plays 2nd stream..
I want to thank you all for thinking this over and give me some advice !!
Thnks
Announcement
Collapse
No announcement yet.
Fallback stream when shoutcast dnas is offline
Collapse
X
-
other side note: autoplay is a mean thing to do, and browsers are starting to block autoplay by default.
always give the user the choice if they want to hear audio from the page before bombarding them with sound. they may very well already be listening to their own music.
and if you still insist on using autoplay, please ffs put the controls to the player in a highly visible easy to identify location on the page, such as at the very top. and if you can, make the play/pause/volume buttons bigger than the rest.
imo the only time autoplay should be used is if the one and only thing on the page is the player. thus the user already expects to just hit the url to tune in...
such as yt pages or https://www.dsfm.tv
Leave a comment:
-
Looks like it does work, only the player takes some time to check the 1st source.
When the 1st source doesn't play, the player shows the |> play button again and that must be clicked.
So i added <audio controls autoplay> to the html.
Now it does work !!
Thank you Neralex !!
Leave a comment:
-
Originally Posted by neralex View PostYou have to add different supported sources likes this:
HTML Code:<audio controls> <source src="http://domain.tld:1111/dnas1.mp3" type="audio/mpeg"> <source src="http://domain.tld:2222/dnas2.mp3" type="audio/mpeg"> </audio>
Leave a comment:
-
You have to add different supported sources likes this:
HTML Code:<audio controls> <source src="http://domain.tld:1111/dnas1.mp3" type="audio/mpeg"> <source src="http://domain.tld:2222/dnas2.mp3" type="audio/mpeg"> </audio>
Leave a comment:
-
Fallback stream when shoutcast dnas is offline
Is it possible to setup a second stream with the html5 audio-player. So when i shutdown my dnas server, the fallback stream will start playing ?
And when reloading the player, the player Always tries to play the first available stream ?
Thank youTags: None
Leave a comment: