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

fix: onPrepared event to wait until player is ready / finished loading the source #1469

Merged
merged 94 commits into from
May 8, 2023

Conversation

Gustl22
Copy link
Collaborator

@Gustl22 Gustl22 commented Apr 11, 2023

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.

  • Fix: cannot play same source twice on Linux

Checklist

  • The title of my PR starts with a [Conventional Commit] prefix (fix:, feat:, docs:, chore: etc).
  • I have read the [Contributor Guide] and followed the process outlined for submitting PRs.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation and added dartdoc comments with ///, where necessary.
  • I have updated/added relevant examples in [example].

Breaking Change

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

Related Issues

Closes #1118
Closes #1384
Closes #1359
#1191

@Gustl22 Gustl22 marked this pull request as ready for review April 11, 2023 21:58
@Gustl22 Gustl22 marked this pull request as draft April 11, 2023 21:59
@Gustl22 Gustl22 marked this pull request as ready for review April 15, 2023 00:28
@Gustl22 Gustl22 marked this pull request as draft April 15, 2023 00:30
@Gustl22 Gustl22 marked this pull request as ready for review April 19, 2023 12:08
Gustl22 added 17 commits May 3, 2023 13:21
# Conflicts:
#	.github/workflows/test.yml
#	packages/audioplayers/example/integration_test/lib_test.dart
#	packages/audioplayers/lib/src/audioplayer.dart
#	packages/audioplayers_android/android/src/main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt
#	packages/audioplayers_linux/linux/audio_player.cc
#	packages/audioplayers_linux/linux/audioplayers_linux_plugin.cc
# Conflicts:
#	packages/audioplayers/example/integration_test/lib_test.dart
#	packages/audioplayers_linux/linux/audio_player.cc
@Gustl22
Copy link
Collaborator Author

Gustl22 commented May 8, 2023

@spydon do you agree merging it like that. I expect flutter/flutter#126209 to take some time... 😅

@spydon
Copy link
Member

spydon commented May 8, 2023

@spydon do you agree merging it like that. I expect flutter/flutter#126209 to take some time... 😅

Sure, since we're tracking it on our side.
Well written Flutter bug!

@Gustl22 Gustl22 merged commit 50f5636 into main May 8, 2023
@Gustl22 Gustl22 deleted the gustl22/prepare-event branch May 8, 2023 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants