Open
Conversation
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
We should make sure to have this or similar description in the merge commit: fix(android): handle only one UpdateRunnable per plugin lifecycle, fix missing position updates when not stopped previously; add IUpdateCallback avoid player.stop and player.pause if not prepared (closes Android, call pause while in prepare status cause PlatformException #139) proper support for live streams (start / stop / no seeking) always create new player, when player mode has changed reset prepared variable, when setting player mode set player via initPlayer before onPrepared is called avoid actuallyPlay if in released state reset source to null, if released; fix setting same source after release always reset shouldSeekTo=-1 when seek was performed refactor positionUpdates to updates as it also handles duration events
fix linting switch to stable channel for web Also necessary to fix CI, which fails on flutter analyze.
* Recreate example android project to apply flutter best practices * Upgrade dependencies: kotlin, gradle, path_provider * Bump compile sdk version to 32 * Add android suffix to android module to comply with naming, e.g. see [UrlLauncher](https://github.com/flutter/plugins/blob/main/packages/url_launcher/url_launcher_android/android/settings.gradle)
* no need to stop on playerComplete event * reset position to zero on playerComplete event * keys for TextWidgets of values in `Tgl` * keys for TextWidgets in toasts * make some methods private * format displayed numbers to be consistent * setSource via file picker * button to get current player state * set release mode to stop by default * handle `onPlayerComplete` and onSeekComplete` globally to be able to display toasts across tabs
* emit duration if start playing * emit seek completed event * avoid resetting player in release mode
tests for player mode / low latency (Android only), volume, playback rate, seek, loop and release mode refactor tests to be separated by tabs enable tests on web for release mode, seek, durationEvent and completionEvent revert example to show toast again when source is set add loop mode to parity table
…compileSdkVersion (#1273) Revert compileSdkVersion to not have a warning during execution, when using sdk <=31.
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
* feat(windows): setBalance * feat(linux): setBalance * doc: Add Balance description * feat: add setBalance in example * tests: add setBalance integration test * fix(web, android, darwin): explicit setBalance unimplemented methods Co-authored-by: Gustl22 <git@reb0.org>
This is regression introduced in 1.0.0.
In 0.2.0, this logic was:
case 'audio.onComplete':
player.state = PlayerState.COMPLETED;
player._completionController.add(null);
So along with the completionController stream being update, the state was set to completed.
In 1.0.0 there is no such functionality:
case 'audio.onComplete':
emitComplete(playerId);
Since audioplayers_platform_interface package doesn't have a reference to player.state anymore because it's now in audioplayers package, my fix consisted of simply listening to this same stream in audioplayers package and updating the state.
Remove unused player state stream. See this comment. BREAKING CHANGE: But it should not play a role: stream was never called, so it never emitted any events, (except for web, which also already emits onComplete event). So most likely no-one did listen to this stream. the according stream is further exposed in main audioplayers package, so it's not breaking the main package.
- audioplayers@1.1.0 - audioplayers_android@1.1.0 - audioplayers_darwin@1.0.2 - audioplayers_linux@1.0.1 - audioplayers_platform_interface@2.0.0 - audioplayers_web@2.0.0 - audioplayers_windows@1.1.0
* chore(tests): only execute tests, if is no draft * fix ios simulator UDID * consistent naming * chore(tests): also run tests on ready_for_review Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
* fix(web): handle infinite value on getDuration * feat: improve web code * feat: improve web code docs * fix(web): currentTime
I decided to do a separate PR, as it doesn't really belong to the tests in #1284. Avoid getting error when calling getDuration on darwin, when getting back infinity or NaN values.
* test: player state tests (#1257) * test: more reliable duration checks * test: test for duration on live stream * test: improve durationRangeMatcher * test(example): allow cleartext traffic / AllowsArbitraryLoads on darwin * test: test onPosition on every platform * tests: overwrite setState for streams tab * fix(linux): install gstreamer1.0-plugins-bad for m3u8 tests * test(windows): disable playlist source (m3u8) on windows
# Description This PR fixes a build error on Android with flutter v3.29. Closes #1873
Prepared all packages to be released to pub.dev Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
# Description - Removed `ios-16`, `macos-13` in favor of `ios-min`, `macos-min`, `android-min` - Option to skip platform min tests - Test Android on SDK 30 and SDK 21
# Description Closes #1526
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
Prepared all packages to be released to pub.dev --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Gustl22 <git@reb0.org>
# Description Now that audioplayers_android_exo is published, we can dynamically add the dependency (before melos is running) to test for both android plugin implementations. ## Breaking Change <!-- Does your PR require audioplayers users to manually update their apps to accommodate your change? If the PR is a breaking change this should be indicated with suffix "!" (for example, `feat!:`, `fix!:`). See [Conventional Commit] for details. --> - [ ] Yes, this is a breaking change. - [x] No, this is *not* a breaking change. <!-- If the PR is breaking, uncomment the following section and add instructions for how to migrate from the currently released version to the new proposed way. --> ## Related Issues <!-- Provide a list of issues related to this PR from the [issue database]. Indicate which of these issues are resolved or fixed by this PR, i.e. Fixes #xxx !--> <!-- Links --> [issue database]: https://github.com/bluefireteam/audioplayers/issues [Contributor Guide]: https://github.com/bluefireteam/audioplayers/blob/main/contributing.md#feature-requests--prs [Conventional Commit]: https://conventionalcommits.org [example]: https://github.com/bluefireteam/audioplayers/tree/main/packages/audioplayers/example
Prepared all packages to be released to pub.dev Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
# Description During publishing the package dependencies are already raised to newer versions, which are not resolvable for `flutter pub add`. So we use path dependency. So common dependencies are in sync with melos relative path dependencies. ## Related Issues See build failure of #1909
This migrates the repository to use Melos v7 and pub workspaces. It also bumps the min SDK version to 3.6.0 and Flutter version to 3.27.0.
Closes #1927 Contributes to flutter/flutter#33850
Added customizable timeout used for seeking and preparation of the player. Closes #1920 --------- Co-authored-by: August <git@reb0.org>
- Allow Flutter versions '>3.x.x' - Raise Flutter version of tests to 3.32.x - Unpin version of flame_lint
Prepared all packages to be released to pub.dev Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…r iOS (#1928) # Description <!-- Provide a description of what this PR is doing. If you're modifying existing behavior, describe the existing behavior, how this PR is changing it, and what motivated the change. If this is a breaking change, specify explicitly which APIs have been changed. --> ## Checklist <!-- Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (`[x]`). This will ensure a smooth and quick review process. --> - [x] The title of my PR starts with a [Conventional Commit] prefix (`fix:`, `feat:`, `refactor:`, `docs:`, `chore:`, `test:`, `ci:` etc). - [x] I have read the [Contributor Guide] and followed the process outlined for submitting PRs. - [x] I have updated/added tests for ALL new/updated/fixed functionality. - [x] I have updated/added relevant documentation and added dartdoc comments with `///`, where necessary. - [x] I have updated/added relevant examples in [example]. ## Breaking Change <!-- Does your PR require audioplayers users to manually update their apps to accommodate your change? If the PR is a breaking change this should be indicated with suffix "!" (for example, `feat!:`, `fix!:`). See [Conventional Commit] for details. --> - [ ] Yes, this is a breaking change. - [x] No, this is *not* a breaking change. <!-- If the PR is breaking, uncomment the following section and add instructions for how to migrate from the currently released version to the new proposed way. --> <!-- ### Migration instructions Before: ``` ``` After: ``` ``` --> ## Related Issues <!-- Provide a list of issues related to this PR from the [issue database]. Indicate which of these issues are resolved or fixed by this PR, i.e. Fixes #xxx !--> Addresses: #1744 <!-- Links --> [issue database]: https://github.com/bluefireteam/audioplayers/issues [Contributor Guide]: https://github.com/bluefireteam/audioplayers/blob/main/contributing.md#feature-requests--prs [Conventional Commit]: https://conventionalcommits.org [example]: https://github.com/bluefireteam/audioplayers/tree/main/packages/audioplayers/example Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
# Description
Remove now unnecessary concurrent `pub get` block from melos config.
## Checklist
<!-- Before you create this PR confirm that it meets all requirements
listed below by checking the
relevant checkboxes (`[x]`). This will ensure a smooth and quick review
process. -->
- [x] The title of my PR starts with a [Conventional Commit] prefix
(`fix:`, `feat:`, `refactor:`,
`docs:`, `chore:`, `test:`, `ci:` etc).
- [x] I have read the [Contributor Guide] and followed the process
outlined for submitting PRs.
- [x] I have updated/added tests for ALL new/updated/fixed
functionality.
- [x] I have updated/added relevant documentation and added dartdoc
comments with `///`, where necessary.
- [x] I have updated/added relevant examples in [example].
## Breaking Change
<!-- Does your PR require audioplayers users to manually update their
apps to accommodate your change?
If the PR is a breaking change this should be indicated with suffix "!"
(for example, `feat!:`, `fix!:`). See [Conventional Commit] for details.
-->
- [ ] Yes, this is a breaking change.
- [x] No, this is *not* a breaking change.
<!-- If the PR is breaking, uncomment the following section and add
instructions for how to migrate from
the currently released version to the new proposed way. -->
<!--
### Migration instructions
Before:
```
```
After:
```
```
-->
## Related Issues
<!-- Provide a list of issues related to this PR from the [issue
database].
Indicate which of these issues are resolved or fixed by this PR, i.e.
Fixes #xxx !-->
<!-- Links -->
[issue database]: https://github.com/bluefireteam/audioplayers/issues
[Contributor Guide]:
https://github.com/bluefireteam/audioplayers/blob/main/contributing.md#feature-requests--prs
[Conventional Commit]: https://conventionalcommits.org
[example]:
https://github.com/bluefireteam/audioplayers/tree/main/packages/audioplayers/example
# Description
This remove a newly introduced linting issue, since breaks are no longer
needed for most switch cases.
## Checklist
<!-- Before you create this PR confirm that it meets all requirements
listed below by checking the
relevant checkboxes (`[x]`). This will ensure a smooth and quick review
process. -->
- [x] The title of my PR starts with a [Conventional Commit] prefix
(`fix:`, `feat:`, `refactor:`,
`docs:`, `chore:`, `test:`, `ci:` etc).
- [x] I have read the [Contributor Guide] and followed the process
outlined for submitting PRs.
- [x] I have updated/added tests for ALL new/updated/fixed
functionality.
- [x] I have updated/added relevant documentation and added dartdoc
comments with `///`, where necessary.
- [x] I have updated/added relevant examples in [example].
## Breaking Change
<!-- Does your PR require audioplayers users to manually update their
apps to accommodate your change?
If the PR is a breaking change this should be indicated with suffix "!"
(for example, `feat!:`, `fix!:`). See [Conventional Commit] for details.
-->
- [ ] Yes, this is a breaking change.
- [x] No, this is *not* a breaking change.
<!-- If the PR is breaking, uncomment the following section and add
instructions for how to migrate from
the currently released version to the new proposed way. -->
<!--
### Migration instructions
Before:
```
```
After:
```
```
-->
## Related Issues
<!-- Provide a list of issues related to this PR from the [issue
database].
Indicate which of these issues are resolved or fixed by this PR, i.e.
Fixes #xxx !-->
<!-- Links -->
[issue database]: https://github.com/bluefireteam/audioplayers/issues
[Contributor Guide]:
https://github.com/bluefireteam/audioplayers/blob/main/contributing.md#feature-requests--prs
[Conventional Commit]: https://conventionalcommits.org
[example]:
https://github.com/bluefireteam/audioplayers/tree/main/packages/audioplayers/example
# Description
This upgrades the gradle versions and some related versions for the
example, and moves to kotlin gradle files.
## Checklist
<!-- Before you create this PR confirm that it meets all requirements
listed below by checking the
relevant checkboxes (`[x]`). This will ensure a smooth and quick review
process. -->
- [x] The title of my PR starts with a [Conventional Commit] prefix
(`fix:`, `feat:`, `refactor:`,
`docs:`, `chore:`, `test:`, `ci:` etc).
- [x] I have read the [Contributor Guide] and followed the process
outlined for submitting PRs.
- [x] I have updated/added tests for ALL new/updated/fixed
functionality.
- [x] I have updated/added relevant documentation and added dartdoc
comments with `///`, where necessary.
- [x] I have updated/added relevant examples in [example].
## Breaking Change
<!-- Does your PR require audioplayers users to manually update their
apps to accommodate your change?
If the PR is a breaking change this should be indicated with suffix "!"
(for example, `feat!:`, `fix!:`). See [Conventional Commit] for details.
-->
- [ ] Yes, this is a breaking change.
- [x] No, this is *not* a breaking change.
<!-- If the PR is breaking, uncomment the following section and add
instructions for how to migrate from
the currently released version to the new proposed way. -->
<!--
### Migration instructions
Before:
```
```
After:
```
```
-->
## Related Issues
<!-- Provide a list of issues related to this PR from the [issue
database].
Indicate which of these issues are resolved or fixed by this PR, i.e.
Fixes #xxx !-->
<!-- Links -->
[issue database]: https://github.com/bluefireteam/audioplayers/issues
[Contributor Guide]:
https://github.com/bluefireteam/audioplayers/blob/main/contributing.md#feature-requests--prs
[Conventional Commit]: https://conventionalcommits.org
[example]:
https://github.com/bluefireteam/audioplayers/tree/main/packages/audioplayers/example
---------
Co-authored-by: Gustl22 <git@reb0.org>
# Description
<!-- Provide a description of what this PR is doing.
If you're modifying existing behavior, describe the existing behavior,
how this PR is changing it,
and what motivated the change. If this is a breaking change, specify
explicitly which APIs have been
changed. -->
When creating lots of audio pools, an "Unknown Error" can happen if too
many players are loaded concurrently. By breaking the instantiation of
new players into a serially-loaded structure, we can load 100s of
players and effectively remove this edge case.
## Checklist
<!-- Before you create this PR confirm that it meets all requirements
listed below by checking the
relevant checkboxes (`[x]`). This will ensure a smooth and quick review
process. -->
- [x] The title of my PR starts with a [Conventional Commit] prefix
(`fix:`, `feat:`, `refactor:`,
`docs:`, `chore:`, `test:`, `ci:` etc).
- [x] I have read the [Contributor Guide] and followed the process
outlined for submitting PRs.
- [x] I have updated/added tests for ALL new/updated/fixed
functionality.
- [x] I have updated/added relevant documentation and added dartdoc
comments with `///`, where necessary.
- [x] I have updated/added relevant examples in [example].
## Breaking Change
<!-- Does your PR require audioplayers users to manually update their
apps to accommodate your change?
If the PR is a breaking change this should be indicated with suffix "!"
(for example, `feat!:`, `fix!:`). See [Conventional Commit] for details.
-->
- [ ] Yes, this is a breaking change.
- [x] No, this is *not* a breaking change.
<!-- If the PR is breaking, uncomment the following section and add
instructions for how to migrate from
the currently released version to the new proposed way. -->
<!--
### Migration instructions
Before:
```
```
After:
```
```
-->
## Related Issues
<!-- Provide a list of issues related to this PR from the [issue
database].
Indicate which of these issues are resolved or fixed by this PR, i.e.
Fixes #xxx !-->
<!-- Links -->
[issue database]: https://github.com/bluefireteam/audioplayers/issues
[Contributor Guide]:
https://github.com/bluefireteam/audioplayers/blob/main/contributing.md#feature-requests--prs
[Conventional Commit]: https://conventionalcommits.org
[example]:
https://github.com/bluefireteam/audioplayers/tree/main/packages/audioplayers/example
---------
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
Prepared all packages to be released to pub.dev Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…itialization error (#1964) Further: - adapt tests - upgrade ci runners - upgrade min platform dependency versions
# Description We at Elredo sometime run into weird issues regarding audio playing using this library. So I started to investigate and I found out that there might be few memory leaks in the library.
…ed (#1922) # Description When an android device is low on storage, it can happen that the OS clears the cache of the app. In that case we get a FileNotFoundException when running an audio file for the 2nd time.
# Description
Same one we have on other repos. I noticed it was missing on
audioplayers.
## Checklist
- [x] The title of my PR starts with a [Conventional Commit] prefix
(`fix:`, `feat:`, `refactor:`,
`docs:`, `chore:`, `test:`, `ci:` etc).
- [x] I have read the [Contributor Guide] and followed the process
outlined for submitting PRs.
- [x] I have updated/added tests for ALL new/updated/fixed
functionality.
- [x] I have updated/added relevant documentation and added dartdoc
comments with `///`, where necessary.
- [x] I have updated/added relevant examples in [example].
## Breaking Change
- [ ] Yes, this is a breaking change.
- [x] No, this is *not* a breaking change.
<!-- Links -->
[issue database]: https://github.com/bluefireteam/audioplayers/issues
[Contributor Guide]:
https://github.com/bluefireteam/audioplayers/blob/main/contributing.md#feature-requests--prs
[Conventional Commit]: https://conventionalcommits.org
[example]:
https://github.com/bluefireteam/audioplayers/tree/main/packages/audioplayers/example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.