notandy / ympd

Standalone MPD Web GUI written in C, utilizing Websockets and Bootstrap/JS
http://www.ympd.org
GNU General Public License v2.0
523 stars 144 forks source link

Basic MPD HTTP audio streaming support #123

Open anthonygclark opened 8 years ago

anthonygclark commented 8 years ago

This is very rudimentary as I am not too versed in JS. My attempt was to connect to an HTTP stream supported by MPD (i.e., no unofficial code), providing actions like play/pause to connected with the ympd buttons.

ASSUMED:

1) You have an active stream - this will always attempt to connect 2) It's always at port 5443

TBD:

1) Dynamically initialize the httpAudioStream variable (connect) only when a specified output if present. Can we detect mpd output type via ympd?

2) Port Setting

3) Timeout support. Currently, the stream will continue even if ympd is stopped but the webpage still exists.

SuperBFG7 commented 8 years ago

Hi @anthonygclark, have a look at my local_play branch. It's an improvement of another atempt. I just didn't have the time to submit a PR yet. https://github.com/SuperBFG7/ympd/tree/local_play

anthonygclark commented 8 years ago

Super,

I just built your local_play branch (and others), and none of my (Linux) browsers played anything. Mine still functions. Any clues?

SuperBFG7 commented 8 years ago

Did you use the additional toolbar button to start the local playback? Playing and playing locally in the browser are decoupled. Did you adjust the port in the config dialog? (if you are using something other than the mpd default of 8000)