just_audio
just_audio copied to clipboard
Sound not playing for the first time
Which API doesn't behave as documented, and how does it misbehave?
Method .play()
does not play a specific sound for the first time it is requested to be played. After first failed play, it works normally.
Minimal reproduction project
Forked project can be found here. Only file edited was main.dart
. Also, a simplified implementation of my JustAudioSoundService
service was included.
To Reproduce (i.e. user steps, not code) Steps to reproduce the behavior:
- Tap button
Tap!
for the first time, no sound will be played - Tap button
Tap!
for a second time, it will play de the sound - Notice this does not happen with button
Nature!
Error messages
No error messages are being thrown.
Expected behavior Sound tap should also be played for the first time.
Smartphone (please complete the following information):
- Device: Xiaomi Redmi 9A
- OS: Android 10 & 11
Flutter SDK version
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.9, on macOS 13.0.1 22A400 darwin-arm, locale es-ES)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.73.1)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
• No issues found!```