-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make streams easy to reset #729
Comments
What should happen to a PersistentStream that doesn't support activation/deactivation? |
I'm guessing you are talking about:
This is the pythonic way of creating an abstract class. Any stream that implements PersistentStream should implement those. As with everything python this is a little loose. |
Should this restart a file player stream to the beginning? |
Yup. Realistically that stream is used mostly for announcements. It should work like the reset of streams though to keep a similar user experience. |
Yup it got included. There's even a button to do it in the UI in |
The meat of this issue is implemented, closing... |
Context
In AmpliPi a stream is defined as any type audio input that can be played on a source in the system. To play audio out a zone a stream needs to be connected to a source with one or more zones.
Steams come in a couple of different flavors. Some streams hold their state and implement the PersistentSream interface, others just implement the BaseStream interface. To reset a PersistentSream it needs to be deactivated and then activated. To reset a BaseStream disconnecting and connecting it from a source provides a full reset.
Problem
Sometimes a stream gets into a bad state and needs to be restarted. How to do this is not obvious at either an API level or from the UI. For the API it even depends on what type of stream it is.
Solution
api/streams/{sid}/reset
endpoint to make unified reset interfaceThe text was updated successfully, but these errors were encountered: