How Do We Stop Playback?

How do we stop playback altogether with the web interface? For example, when listening to Tune-In, I don’t see a way to stop playback. The Pause button is there, but it appears to actually buffer up playback when you pause. That means the Pi is still working. Is there a way to just plain stop playback without rebooting?


Why do you want that? It does not use much resources in pause I think?

In /opt/webclient/js/controls.js line 279 or so you can change mopidy.playback.pause(); to mopidy.playback.stop(); if you want.

1 Like

My specific use case is a whole home sound system with 8 zones. 8 Raspberry Pi’s running 24/7 isn’t really something I’d like to leave going. I see what you mean about SubSonic sources, but streaming sources seem different. The device would be using data constantly. Plus, it’s not clear what happens with the buffered streaming data. Won’t it overrun my SD card?


Why don't you want to leave them running? Their power usage is tiny and you won't have to boot them each time. The buffer is fixed in size and very small so there's absolutely no worry there.

I tried to explain above. The streaming services appear to continue to pull data, which means constant data usage (we don’t have the fattest pipe). Then multiply that by 8 devices and 24/7 flow, and that’s a lot of wasted bandwidth.

Is there some technical reason that the normal controls for audio (play, pause, stop, jump fwd/back, next/prev track etc.) are difficult to provide?


No. The functionality for all those controls is provided by Mopidy, it's just stop isn't exposed in musicbox Web client ui as most people don't need it. The change to include stop is trivial as wouter showed, the rest is already provided.

Is it really using a lot of data when it’s paused? I never tested it, but if it does, you could file a bug for mopidy. The webclient uses pause instead of stop because stop resets the playing time of the track

For streaming services like Tune-In, it needs to continue to stream data in order to provide pause functionality. Unlike file playback, the data will continue to be updated and be lost if not downloaded. That’s what appears to be happening (not sure what the time/storage limit is).

BTW, the pause of live streaming is a great feature. But if I’m listening to the radio in the morning, and return in the evening (or days later) to listen again, I’d likely want to listen to live programming. I’m not sure how to do that with the current interface, without switching to a different stream and then switching back. It seems both buttons/functions would be useful.

rtillery is open to address this on the mopidy side of things. As streaming of live sources isn’t something the webclients can solve themselves. Likely solution is to treat pause as stop for things we consider live.

Hmm, I'll be honest, I dont think I've actually played around with that. I thought the buffering was just the small amount in Mopidy's gstreamer pipeline. Tunein itself doesn't host any streams, can it be that the particular streams you are trying to play are seekable?