Page 1 of 1


Posted: November 30th, 2019, 3:09 pm
by perman
I'm going to build simple Web client for MPD written in React.js. I'd like to host it with online and communicate with MPD with HTTP (no installation required).

For that purpose, I need MPD to be able to communicate over HPPT or Websockets and I've heard something about building HTTP server in MPD but I was not able to find any documentation of that feature. The only documentation I found was about streaming music over HTTP. So I wanted to ask if it is possible to issue commands to MPD over HTTP or not and if it is possible the how.

I've already tried implementing my own server that will provide HTTP API and translate all requests to sockets with Flask and python-mpd2. Do you think this is a good approach?

Thanks for any suggestions.
MPD rocks!


Posted: December 1st, 2019, 11:46 am
by max
MPD has a HTTP server, but it's only there to serve streaming audio. It cannot be used to control MPD.


Posted: December 1st, 2019, 2:59 pm
by perman
Thanks. And do you know about something I could use to create my web client? (I feel like there had to be something like HTTP server for mpd like 3rd party package or something)
I've tried to find something but without much luck.



Posted: December 1st, 2019, 3:23 pm
by max
I don't know something. I believe every MPD web client reimplemented its own HTTP API to access MPD. Of course, that's bad - but it's just as bad as writing yet another web client.