From 07dfbac76a48e3c3c393a3c91feab498fd2e154d Mon Sep 17 00:00:00 2001 From: Ryan Heise Date: Sat, 23 Jan 2021 15:27:59 +1100 Subject: [PATCH] More bug fixes on web for playlist manipulation (just_audio_web 0.2.3). --- just_audio_web/CHANGELOG.md | 4 ++++ just_audio_web/lib/just_audio_web.dart | 4 ++-- just_audio_web/pubspec.lock | 19 +++++++++++++------ just_audio_web/pubspec.yaml | 2 +- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/just_audio_web/CHANGELOG.md b/just_audio_web/CHANGELOG.md index 1634d1ae9..987f46121 100644 --- a/just_audio_web/CHANGELOG.md +++ b/just_audio_web/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.3 + +* Fix bug when modifying playlists (insert/move). + ## 0.2.2 * Fix bug with empty playlist. diff --git a/just_audio_web/lib/just_audio_web.dart b/just_audio_web/lib/just_audio_web.dart index a80d2c745..0d29fa83f 100644 --- a/just_audio_web/lib/just_audio_web.dart +++ b/just_audio_web/lib/just_audio_web.dart @@ -309,9 +309,9 @@ class Html5AudioPlayer extends JustAudioPlayer { @override Future concatenatingInsertAll( ConcatenatingInsertAllRequest request) async { + _concatenating(request.id).setShuffleOrder(request.shuffleOrder); _concatenating(request.id) .insertAll(request.index, getAudioSources(request.children)); - _concatenating(request.id).setShuffleOrder(request.shuffleOrder); if (request.index <= _index) { _index += request.children.length; } @@ -353,8 +353,8 @@ class Html5AudioPlayer extends JustAudioPlayer { @override Future concatenatingMove( ConcatenatingMoveRequest request) async { - _concatenating(request.id).move(request.currentIndex, request.newIndex); _concatenating(request.id).setShuffleOrder(request.shuffleOrder); + _concatenating(request.id).move(request.currentIndex, request.newIndex); if (request.currentIndex == _index) { _index = request.newIndex; } else if (request.currentIndex < _index && request.newIndex >= _index) { diff --git a/just_audio_web/pubspec.lock b/just_audio_web/pubspec.lock index 7be97a186..582ad4b0e 100644 --- a/just_audio_web/pubspec.lock +++ b/just_audio_web/pubspec.lock @@ -7,14 +7,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0-nullsafety.5" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0-nullsafety.5" flutter: dependency: "direct main" description: flutter @@ -25,6 +25,13 @@ packages: description: flutter source: sdk version: "0.0.0" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.3-nullsafety.3" just_audio_platform_interface: dependency: "direct main" description: @@ -38,7 +45,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.6" plugin_platform_interface: dependency: transitive description: @@ -57,14 +64,14 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.5" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0-nullsafety.5" sdks: - dart: ">=2.10.0-110 <2.11.0" + dart: ">=2.12.0-0 <3.0.0" flutter: ">=1.12.13+hotfix.5" diff --git a/just_audio_web/pubspec.yaml b/just_audio_web/pubspec.yaml index ad6cfd922..17c8205b7 100644 --- a/just_audio_web/pubspec.yaml +++ b/just_audio_web/pubspec.yaml @@ -1,7 +1,7 @@ name: just_audio_web description: Web platform implementation of just_audio homepage: https://github.com/ryanheise/just_audio/tree/master/just_audio_web -version: 0.2.2 +version: 0.2.3 flutter: plugin: