record icon indicating copy to clipboard operation
record copied to clipboard

Unexpected behaviour: can't play/pause audio using headphones after starting and stopping recording

Open bartolomej opened this issue 5 months ago • 0 comments

Package version

  • record: 5.1.2
  • audio_service: 0.18.15

Environment

  • OS: IOS

Describe the bug

I'm using audio service lib to play audio and receive play/pause events. It all works as expected, but once I start (and later stop) recording using recorder library, the play/pause events are not received anymore. And that's even after I dispose of the recorder (call _audioRecorder.dispose()).

To Reproduce

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

Expected behavior

I would expect the play/pause events to be received even if the audio is being recorded (or a configuration option that allows that). Note that I can play the audio while recording, but only by calling play/pause explicitly on the audio player, and not by using the headphone controls.

bartolomej avatar Aug 28 '24 17:08 bartolomej