flutter_sound icon indicating copy to clipboard operation
flutter_sound copied to clipboard

[HELP]: incoming voice/video call doesn't close the audio session!

Open EmelianShkira opened this issue 3 years ago • 1 comments

how to handle recorder state and close audio session when phone ringing for incoming call or video call for example if I start recording and suddenly someone call me from WhatsApp the recoder won't stop even if I answer on the call it's keep recording without close the audio session! here it's my config for open audio session:

await myRecorder!.openAudioSession(
    focus: AudioFocus.requestFocusAndStopOthers,
    category: SessionCategory.playAndRecord,
    mode: SessionMode.modeDefault,
    device: AudioDevice.speaker,
    audioFlags: outputToSpeaker | allowBlueToothA2DP | allowAirPlay,
  );

EmelianShkira avatar Mar 18 '22 15:03 EmelianShkira

Perhaps you can look to the audio_session plugin.

Larpoux avatar Mar 18 '22 18:03 Larpoux

This issue is stale because it has been open 90 days with no activity. Leave a comment or this will be closed in 7 days.

github-actions[bot] avatar Dec 04 '23 01:12 github-actions[bot]