Skip to content

Commit

Permalink
some minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
anandnet committed Sep 27, 2024
1 parent 86712b8 commit 8ed587f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions lib/services/audio_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ class MyAudioHandler extends BaseAudioHandler with GetxServiceMixin {
androidLoadControl: AndroidLoadControl(
minBufferDuration: Duration(seconds: 50),
maxBufferDuration: Duration(seconds: 120),
bufferForPlaybackDuration: Duration(milliseconds: 800),
bufferForPlaybackAfterRebufferDuration: Duration(seconds: 3),
bufferForPlaybackDuration: Duration(milliseconds: 50),
bufferForPlaybackAfterRebufferDuration: Duration(seconds: 2),
)));
_createCacheDir();
_addEmptyList();
Expand Down Expand Up @@ -447,7 +447,9 @@ class MyAudioHandler extends BaseAudioHandler with GetxServiceMixin {

mediaItem.add(currentSong);
final streamInfo = await futureStreamInfo;
if (streamInfo == null || songIndex != currentIndex || !streamInfo[0]) {
if (songIndex != currentIndex) {
return;
} else if (streamInfo == null || !streamInfo[0]) {
currentSongUrl = null;
isSongLoading = false;
Get.find<PlayerController>().notifyPlayError(streamInfo == null);
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1118,10 +1118,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
url: "https://pub.dev"
source: hosted
version: "14.2.4"
version: "14.2.5"
web:
dependency: transitive
description:
Expand Down

0 comments on commit 8ed587f

Please sign in to comment.