feat: reconfigure AudioService after init
Allows AudioService to be re-configured after init. This makes it possible to dynamically change iOS forward/rewind interval shown in the control center or fx. the android notification color.
This was a use-case for our app, where the user can quickly change a preferred duration for the forward/rewind skip interval during playback and we'd like the iOS control center to update dynamically without having to stop and re-init the entire AudioService.
And thanks for your work on this feature-rich and very well designed plugin 👍
Pre-launch Checklist
- [x] I read the CONTRIBUTING.md and followed the process outlined there for submitting PRs.
- [x] My change is not breaking and lands in
minorbranch. - [x] ? How do I check this ? If I'm the first to contribute to the next version, I incremented the version number in
pubspec.yamlaccording to the pub versioning philosophy. - [x] I updated CHANGELOG.md to add a description of the change (format:
* DESCRIPTION OF YOUR CHANGE (@your-git-username)). - [x] I updated/added relevant documentation (doc comments with
///). - [x] I ran
dart analyze. - [x] I ran
dart format. - [x] I ran
flutter testand all tests are passing.
Hi @ddfreiling , thanks for the PR. This has been on the table for a while but I hadn't done it yet because I wanted to carefully go through each config option and decide if there was a better place to put it that could be dynamically updated. Some of these options are more dynamic than others, and it may make sense to have different ways of updating some of these independently of the others.
Free free to leave this PR open since I believe some people may be using it in the absence of any official solution.