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

sync audioplayers #1

Open
wants to merge 536 commits into
base: master
Choose a base branch
from
Open

sync audioplayers #1

wants to merge 536 commits into from

Conversation

ca333
Copy link

@ca333 ca333 commented Feb 20, 2022

No description provided.

luanpotter and others added 30 commits March 26, 2022 15:40
* Initial support for Windows

* Added Windows build github job.

* Windows now linking to windowsapp lib

* Merge main

* Update packages/audioplayers/pubspec.yaml

* Apply suggestions from code review

* Update packages/audioplayers_windows/windows/audio_player.h

Co-authored-by: Luan Nico <[email protected]>
* GH-Actions: run build manually

* fix(workflows): attempt to fix CI by changing order of flutter-action in ios build
* chore: Update to flame_lint 0.1.0

* Fix formatting

Co-authored-by: Luan Nico <[email protected]>
* feat(workflows): replace deprecated joschi/setup-jdk with actions/setup-java

* feat(workflows): add timeout limits

Co-authored-by: Luan Nico <[email protected]>
Gustl22 and others added 30 commits November 20, 2023 13:55
# Description

Improve the documentation for:

- Getting started: 
  - Fix typos from #1678
  - Call stop in low latency, missing completion event (#1489)
  - Set prefix for AssetSource via AudioCache (#1620, #1639)
- Troubleshooting guide:
  - Verify audio format, e.g. with Aconvert
  - Change heading size of web-cors-policy
- Example:
  - README: How to setup example with `melos`, tab descriptions
- example.md: Add Simple (one-page) Example for pub.dev, see
https://dart.dev/tools/pub/package-layout#examples (#1616)
  - Showcase for using play in `addPostFrameCallback`

Closes #1650

Co-authored-by: Lukas Klingsbo <[email protected]>
# Description

Setup-cocoapods is used to install the according version before
building. But this is not necessarily needed, as a higher installation
should still be able to execute macos apps with pods lower than
described in the podfile.lock.
# Description

Wait for seek to finish by listening to the
`AudioEventType.seekComplete` event.
…ocus` (#1720)

# Description

- Introduces `AudioContextConfigFocus.mixWithOthers` to unify
`AVAudioSessionOptions.mixWithOthers` (iOS) and `AndroidAudioFocus.none`
(Android)
- Replaces the option `AudioContextConfig.duckAudio = true` with
`AudioContextConfig.focus = AudioContextConfigFocus.duckOthers`

Closes #1718

### Migration instructions

Before:
```dart
AudioContextConfig(
  duckAudio: true,
);
```

After:
```dart
AudioContextConfig(
  focus: AudioContextConfigFocus.duckOthers,
);
```
)

# Description

Failures which occured in OnMediaStateChange method, were also thrown in
OnMediaError. So the error was propagated twice and therefore the tests
fail from time to time. This ensures to correctly throw the error only
once, but also log the state change failure.
# Description

Wait simultaneously for async calls (Futures and Streams) to ensure all
errors are propagated through one common future. Previously a stream
could throw an error before it was even listened to, as the process
still awaited an async call (here `setSource`).

## 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.
- [ ] I have updated/added relevant examples in [example].

The tests are adapted, but not explicitly written to avoid that error.
But the error would occur since Flutter 3.16.x, so they are tested
against in #1715 without further ado.

## Breaking Change

- [ ] Yes, this is a breaking change.
- [x] No, this is *not* a breaking change.

## Related Issues

#1715

<!-- 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

Update minimum required Flutter version to 3.13.0 as Linux requires at
least that version to work properly due to a bug.
Therefore we also only test against 3.13.0 and higher (here 3.16.8).
Also remove `dartdoc` dependency introduced in
7ca5058 as the package is integrated in
dart SDK since v5.0.0.

Fix pump Linux, introduced in
flutter/flutter#135266
(flutter/flutter@5def6f2)
# Description

There are conflicts on writing to the same location of the temporary
file path, when loading assets. This should be differentiated anyways as
two individual AudioCaches should not share the same cache location.

Closes #1424
Due to lack of nested virtualization (hardware acceleration), the
Android tests had to be executed on MacOS.
Since a [GitHub
update](https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/)
they should be executable on ubuntu-runners.
# Description

Fixes the warning `'audioProcessing' was deprecated in iOS 10.0: No
longer supported`.

## Related Issues

Fixes #1402
Fixes #1722
# Description

This PR migrates usage of `dart:html` and `package:js` to their new
replacements. It also updates version constraints and CI configuration
to account for the versions required. These changes enable compilation
to Wasm and improves compatibility with Dart's evolving web interop
story. There are potentially bundle size improvements as well.

Dart and Flutter will prefer `dart:js_interop`, extension types, and
`package:web` as used here going forward. Check out
https://dart.dev/interop/js-interop/package-web to learn more.

Fixes #1765
# Description

On executing the windows tests, a virtual audio device is needed, which
can only be installed with a certificate valid to a specific date.
Recently the tests failed, as the date time was set before downloading
and therefore threw a `NotTimeValid` error. This fixes that by
downloading the source first, setting the date time and then installing
it.
## Related Issues

Closes #1692, closes #1670, closes #1663, closes #1269
# Description

Closes #1802

Disabled tests for macos partially, as they are blocking the development
and will be continued to be fixed in #1769
# Description

Disabled flaky test for live streams on macos 13, as it's blocking the
development but the test passes locally on macos 14.
# Description

The package `web` 1.0.0 was released, which cannot be used currently
with audioplayers.
# Description

This allows publishing audioplayers from the GitHub CI.
The PR creation is available as a workflow dispatch (with option for
prerelease) to not overwhelm the PR pipeline.

See: dart-lang/pub-dev#7177
# Description

Avoid playing when the app gains audio focus, e.g. after a phone call.
Also pause the audio when losing focus, or only pause it temporarly if
losing transient focus.

## Related Issues

closes #1853
closes #1854
closes #1688
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.