Skip to content

Multiple audio instances not playing simultaneously with version 6.1.x #1883

Answered by Gustl22
Sangiovanni asked this question in Q&A
Discussion options

You must be logged in to vote

Actually we already changed this behavior with 6.0.0 already, so I thought this is also enforced in Android, which was not the case. We fixed this with version 6.1.2 (without knowing it wasn't actually working before), so no major version upgrade was done, unfortunately.
https://pub.dev/packages/audioplayers/changelog#600

So what you actually have to do is setting the audio context, before starting to play e.g. in the initState method:
https://github.com/bluefireteam/audioplayers/blob/main/getting_started.md#audio-context

        final audioContext = AudioContextConfig(
          focus: AudioContextConfigFocus.mixWithOthers,
        ).build();

        // Either this before creating a pla…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Sangiovanni
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants