This is so weird, a few weeks ago I was trying to work out (with little knowledge of the technologies involved) how to do almost exactly this, only with video. Right down to a control "frontend" and a "play" frontend. Specifically, how to forward a video from X source (say, YouTube or via invidious, but the idea would be that any source could be chosen on the fly) to some kind of HTTP stream that could then be picked up by a device (or multiple devices simultaneously) of choice.
Maybe looking at how this is built will give me some pointers