-
-
Notifications
You must be signed in to change notification settings - Fork 484
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
SwitchAudioHandler.playbackStream does not forward errors from inner audio handlers #986
Comments
Yes, I can see what you mean, thanks for finding and reporting this. I would be happy to accept a pull request. Your code snippet seems like it should work since it is the most similar to the way the current code works, since it returns the subscription object, but if you find an alternative way that satisfies the requirements, that should also be OK. |
I've created the pull request with the resolution outlined above #987:
I hope I did everything right - let me know if something is needed. 💎 |
Documented behaviour
Updating the UI in response to state changes.
Actual behaviour
SwithAudioHandler.playbackState does not propagate errors. In a SwitchAudioHandler implementation the inner handlers cannot propagate errors with playbackState.addError because of the way of how SwitchAudioHandler forwards these events.
This is where the problem occures:
audio_service/audio_service/lib/audio_service.dart
Lines 2005 to 2014 in bca317a
Minimal reproduction project
I thought I leave out a reproduction of the error since it's quite obvious from the code that errors of the underlying stream won't be propagated.
Reproduction steps
Output of flutter doctor
Devices exhibiting the bug
iOS Simulator 13.2
Suggestions to fix
If you consider to fix this problem, I can create a pull request with a chosen resolution.
The text was updated successfully, but these errors were encountered: