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

feat(android): set source synchronously #1191

Merged
merged 2 commits into from
Jul 8, 2022

Conversation

Gustl22
Copy link
Collaborator

@Gustl22 Gustl22 commented Jun 24, 2022

I now did some tests with various platforms and used some tools to lower the bandwidth, to simulate slow loading of the sources.

  • Windows blocks the UI-thread, which is unfortunate, but does its job (maybe can/should be fixed someday).
  • Linux is not waiting at all, but its loading the source as soon as it starts playing
  • Android loads the source, but asynchronously. With this PR the source is loaded synchronously, but I double checked, that the UI isn't freezed during that time. So one can wait until the source has finished loading.

I also wanted to add some tests for that to the CI, but that might be overengineered to add the tools to reliably setup the bandwidth for various platforms, wich also might not work on each platform

@Gustl22 Gustl22 changed the title feat(android): wait for source to be prepared feat(android): set source synchronously Jun 24, 2022
@Gustl22
Copy link
Collaborator Author

Gustl22 commented Jul 7, 2022

@luanpotter would you mind having a look? Thank you :D

Copy link
Member

@luanpotter luanpotter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luanpotter luanpotter merged commit 5eeca89 into bluefireteam:main Jul 8, 2022
@Gustl22 Gustl22 deleted the feat/android-prepare-source branch July 12, 2022 04:35
Gustl22 added a commit that referenced this pull request 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants