From 4ac4ab1b45bdece2146adc1f08432e775d40ec78 Mon Sep 17 00:00:00 2001 From: Ryan Heise Date: Sat, 1 Feb 2025 19:18:14 +1100 Subject: [PATCH] Futureproof sinkId, add missing implementations, tests, bump versions, CHANGELOGs. --- just_audio/CHANGELOG.md | 4 ++ just_audio/lib/just_audio.dart | 39 ++++++++++++++----- just_audio/pubspec.yaml | 6 +-- just_audio/test/just_audio_test.dart | 10 +++++ just_audio_background/CHANGELOG.md | 4 ++ just_audio_background/example/pubspec.yaml | 2 +- .../lib/just_audio_background.dart | 11 ++++++ just_audio_background/pubspec.yaml | 4 +- just_audio_platform_interface/CHANGELOG.md | 4 ++ .../lib/just_audio_platform_interface.dart | 18 ++++++--- just_audio_platform_interface/pubspec.yaml | 2 +- just_audio_web/CHANGELOG.md | 4 ++ just_audio_web/lib/just_audio_web.dart | 12 +++--- just_audio_web/pubspec.yaml | 6 +-- 14 files changed, 97 insertions(+), 29 deletions(-) diff --git a/just_audio/CHANGELOG.md b/just_audio/CHANGELOG.md index 7148d9727..0572b63f6 100644 --- a/just_audio/CHANGELOG.md +++ b/just_audio/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.45 + +* Add setWebSinkId for web (@dganzella). + ## 0.9.44 * Add support for SwiftPM. diff --git a/just_audio/lib/just_audio.dart b/just_audio/lib/just_audio.dart index 84eccc3bc..84688a2b9 100644 --- a/just_audio/lib/just_audio.dart +++ b/just_audio/lib/just_audio.dart @@ -144,6 +144,7 @@ class AudioPlayer { bool _platformLoading = false; AndroidAudioAttributes? _androidAudioAttributes; WebCrossOrigin? _webCrossOrigin; + String _webSinkId = ''; final bool _androidApplyAudioAttributes; final bool _handleAudioSessionActivation; @@ -580,6 +581,9 @@ class AudioPlayer { /// instance on web. WebCrossOrigin? get webCrossOrigin => _webCrossOrigin; + /// The current sink ID of the `