Skip to content

Commit

Permalink
notify type and not pause
Browse files Browse the repository at this point in the history
  • Loading branch information
orz12 committed Jul 29, 2024
1 parent a511bd5 commit abab8f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/services/audio_session.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AudioSessionHandler {
session = await AudioSession.instance;
await session.configure(const AudioSessionConfiguration.music());

session.interruptionEventStream.listen((event) async {
session.interruptionEventStream.listen((AudioInterruptionEvent event) async {
final playerStatus = PlPlayerController.getPlayerStatusIfExists();
// final player = PlPlayerController.getInstance();
if (event.begin) {
Expand All @@ -35,8 +35,8 @@ class AudioSessionHandler {
case AudioInterruptionType.pause:
case AudioInterruptionType.unknown:
SmartDialog.showNotify(
msg: '音频播放被中断, $event', notifyType: NotifyType.error);
PlPlayerController.pauseIfExists(isInterrupt: true);
msg: '音频播放被中断, ${event.type}', notifyType: NotifyType.error);
// PlPlayerController.pauseIfExists(isInterrupt: true);
_playInterrupted = true;
break;
}
Expand Down

0 comments on commit abab8f5

Please sign in to comment.