Closed Mo0Khaled closed 1 month ago
solved it FYI
final audioContext = AudioContext(
android: const AudioContextAndroid(
audioFocus: AndroidAudioFocus.gainTransientMayDuck,
),
);
_audioPlayer = AudioPlayer();
await _audioPlayer?.play(
AssetSource(soundEffectPath),
mode: PlayerMode.lowLatency,
ctx: audioContext,
Checklist
Current bug behaviour
When we play a music at the background then we open the app we play audio at the starting point of the app but the music at the background stopped.
Expected behaviour
The two sounds should be playing in parallel.
Steps to reproduce
I am using:
Flutter 3.24.1 audioplayers: ^6.1.0
the duck audio was exists on audioplayers: ^0.20.1 inside AudioCache class.
Affected platforms
Android, iOS
AudioPlayers Version
6.1.0
Build mode
debug, release