Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio has a delay after resume to start to play #1359

Closed
2 tasks done
gustoliveira opened this issue Dec 28, 2022 · 1 comment · Fixed by #1469
Closed
2 tasks done

Audio has a delay after resume to start to play #1359

gustoliveira opened this issue Dec 28, 2022 · 1 comment · Fixed by #1469
Labels
bug platform-linux Affects the linux platform

Comments

@gustoliveira
Copy link

Checklist

  • I read the troubleshooting guide before raising this issue
  • I made sure that the issue I am raising doesn't already exist

Sometimes, when I press to play the audio, it has a big delay to start to play. The PlayerState it's playing right after press play, the file it's already downloaded.

Current bug behaviour

  1. Set source from deviceFile.
  2. audioPlayer.onPlayerStateChanged dispatch isReady state.
  3. Press play button, that calls audioPlayer.resume() method.
  4. audioPlayer.onPlayerStateChanged dispatch playing state.
  5. Wait until the audio starts to play, sometimes wait more then 1 minute.

Expected behaviour

  1. Set source from deviceFile.
  2. audioPlayer.onPlayerStateChanged dispatch isReady state.
  3. Press play button, that calls audioPlayer.resume() method.
  4. audioPlayer.onPlayerStateChanged dispatch playing state.
  5. Play right after press the button since the state it's ready.

Reproducing

bug.mp4

Environment information

  • audioplayers version: 1.1.1

Platform 1: Ubuntu 22.10, Ubuntu 22.04 LTS, Ubuntu 18.04 LTS

  • build mode: debug and release mode

Platforms tested without any issue: Windows 10

@Gustl22
Copy link
Collaborator

Gustl22 commented Jan 11, 2023

Okay seems a very long delay, but as I see the source is a video, so I expect this is quite large. We would need to implement #361 to better tackle this.

@Gustl22 Gustl22 added the platform-linux Affects the linux platform label Jan 11, 2023
@bluefireteam bluefireteam deleted a comment from BraveEvidence Mar 15, 2023
Gustl22 added a commit that referenced this issue May 8, 2023
…g the source (#1469)

# Description

Add a callback when the player has prepared its source, which is tangled
to the asynchronous `setSource` method, to improve experience, when
player should actually play and not wait for the player to prepare /
load the source. 

## Related Issues

Closes #1118 
Closes #1384 
Closes #1359

#1191
flutter/flutter#126209
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug platform-linux Affects the linux platform
Projects
None yet
2 participants