You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like ympd to be the only UI I need to offer to users in my house. I have mpd configured to be streaming-only, and these days the <audio> tag is super slick and pretty reliable so I feel like we should be able to do an all-in-one thing these days!
Here's my mpd.conf, based on the default sample, so probably it's what most people are also running:
$ cat /etc/mpd.conf
# See: /usr/share/doc/mpd/mpdconf.example
pid_file "/run/mpd/mpd.pid"
db_file "/var/lib/mpd/mpd.db"
state_file "/var/lib/mpd/mpdstate"
playlist_directory "/var/lib/mpd/playlists"
audio_output {
type "httpd"
name "radio"
encoder "vorbis" # optional, vorbis or lame
port "8000"
bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
quality "6.0" # do not define if bitrate is defined
format "44100:16:1"
max_clients "50" # optional 0=no limit
}
So maybe add an endpoint that proxies /stream/ -> localhost:8000, and rewrite the player as <audio src="/stream"></audio>
Or maybe it can ask MPD for its list of open stream ports and set the stream URL dynamically
It should probably be <audio src=":8000" controls></audio>, but that will add a bunch of buttons to the UI that will collide with the pre-existing ympd controls, and it will be easy to confuse the client <audio> controls with ympd's pre-existing play/pause/stop/skip/volume controls. What does everyone think? Should we hide the <audio> controls and instead control it indirectly (via javascript) (e.g. just set volume to the max and make it play iff mpd is playing)?
I want to be able to give people a link to ympd and have it Just Work, so it should also say ``<audio ... autoplay>`, but playing continuously is tricky:
When mpd runs out of tracks or is paused, it shuts down the http stream, and most players (VLC, mplayer, etc) need to be manually reset. Firefox too. It would be good if there was a setInterval() wrapped around it to try to reconnect every so often.
While experimenting I ran into caching glitches. I managed to get Firefox into a state where it only played the same 17 seconds over and over again, even after turning off caching in developer tools. Strangely, opening a tab in the same process to http://mpdbox.local:8000 worked perfectly, so it's just something
The text was updated successfully, but these errors were encountered:
3. I want to be able to give people a link to ympd and have it Just Work, so it should also say ``<audio ... autoplay>`, but playing continuously is tricky:
* When mpd runs out of tracks or is paused, it shuts down the http stream, and most players (VLC, mplayer, etc) need to be manually reset. Firefox too. It would be good if there was a `setInterval()` wrapped around it to try to reconnect every so often.
I would like ympd to be the only UI I need to offer to users in my house. I have mpd configured to be streaming-only, and these days the
<audio>
tag is super slick and pretty reliable so I feel like we should be able to do an all-in-one thing these days!Here's my mpd.conf, based on the default sample, so probably it's what most people are also running:
I would like to add
Somewhere in
index.html
and have it play.There's a few subtleties about this:
/stream/
->localhost:8000
, and rewrite the player as<audio src="/stream"></audio>
<audio src=":8000" controls></audio>
, but that will add a bunch of buttons to the UI that will collide with the pre-existing ympd controls, and it will be easy to confuse the client<audio>
controls with ympd's pre-existing play/pause/stop/skip/volume controls. What does everyone think? Should we hide the<audio>
controls and instead control it indirectly (via javascript) (e.g. just set volume to the max and make it play iff mpd is playing)?setInterval()
wrapped around it to try to reconnect every so often.The text was updated successfully, but these errors were encountered: