Skip to content

Commit

Permalink
Some changes to achieve #133
Browse files Browse the repository at this point in the history
  • Loading branch information
anandnet committed Sep 15, 2024
1 parent 78db115 commit cda7528
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/services/audio_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,14 @@ class MyAudioHandler extends BaseAudioHandler with GetxServiceMixin {
JustAudioMediaKit.title = 'Harmony music';
JustAudioMediaKit.protocolWhitelist = const ['http', 'https', 'file'];
}
_player = AudioPlayer();
_player = AudioPlayer(
audioLoadConfiguration: const AudioLoadConfiguration(
androidLoadControl: AndroidLoadControl(
minBufferDuration: Duration(seconds: 50),
maxBufferDuration: Duration(seconds: 120),
bufferForPlaybackDuration: Duration(milliseconds: 800),
bufferForPlaybackAfterRebufferDuration: Duration(seconds: 3),
)));
_createCacheDir();
_addEmptyList();
_notifyAudioHandlerAboutPlaybackEvents();
Expand Down

0 comments on commit cda7528

Please sign in to comment.