A cross platform Audiobookshelf client for Android and iOS
Dart
Show the widget as paused when a call or another app interrupts playback
Barnabas5adcec568e4a
diff --git a/lib/services/audio_player_service.dart b/lib/services/audio_player_service.dartindex db22a7cf..442e27cd 100644--- a/lib/services/audio_player_service.dart+++ b/lib/services/audio_player_service.dart@@ -2706,6 +2706,11 @@ class AudioPlayerService extends ChangeNotifier {await service._player?.pause();service._lastPauseTime = DateTime.now();service._wasPlayingBeforeInterrupt = true;+ // The notification reads the player directly, but the home+ // widget, cards and watch only refresh on notify - without this+ // the widget kept showing "playing" and ticking its clock+ // through the whole interruption.+ service.notifyListeners();}} else {if (event.type == AudioInterruptionType.duck &&