just_audio icon indicating copy to clipboard operation
just_audio copied to clipboard

Sound not playing for the first time

Open pitazzo opened this issue 2 years ago • 11 comments

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:

  1. Tap button Tap! for the first time, no sound will be played
  2. Tap button Tap! for a second time, it will play de the sound
  3. 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!```

pitazzo avatar Dec 03 '22 11:12 pitazzo