Closed bartolomej closed 2 months ago
This seems more like a bug report than a feature request, but even then, I'm not sure whether this really is a bug. When you say audio service play/pause events are not received anymore, received from what source? If the source of these events is your own app, then it is your own app that's responsible for that.
@ryanheise
When you say audio service play/pause events are not received anymore, received from what source?
It's received from the headset play/pause buttons, if that's what you mean.
So I'm setting up the audio handler like so: https://github.com/bartolomej/audio-service-headset-controls-example/blob/68aea5173176159de87010df17f4f9e9b2d82fc3/lib/main.dart#L174-L257
And then after I do any recording from a microphone, the events in the handler are not received anymore:
Can you submit a bug report please? There are several pieces of information missing from this issue which would be there if you filled in the bug report template instead of the feature request template. For example, Android vs iOS.
Also keep in mind that this is not necessarily a bug, and so in the process of submitting the bug report, you should narrow the issue down to this plugin specifically (as opposed to a problem with your own app's code, or a problem in the package you use for recording from the microphone. For background, please read the audio_session README which gives an overview of how using multiple audio plugins within the same project might conflict unless they cooperate.)
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with audio_service.
Feature proposal
Audio service play/pause events work as expected at the beginning, but once I start (and later stop) recording using the record library, the play/pause events are not received anymore. And that's even after I dispose of the recorder (
call _audioRecorder.dispose()
).Here is a reproducible example (hit the microphone button to start recording, and then hit it again to stop recording): https://github.com/bartolomej/audio-service-headset-controls-example
Can we make some changes to get this working?
Motivating use case(s)
We have an app that records the user voice and listens for play/pause headphone events, which should stop the recording. This is not possible with the current behaviour of this (or record) libraries.