From abab8f5f50fe21f8972f1f1400e723bc7a01951b Mon Sep 17 00:00:00 2001 From: orz12 Date: Mon, 29 Jul 2024 19:14:34 +0800 Subject: [PATCH] notify type and not pause --- lib/services/audio_session.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/services/audio_session.dart b/lib/services/audio_session.dart index 34c9ef133..b404e72f0 100644 --- a/lib/services/audio_session.dart +++ b/lib/services/audio_session.dart @@ -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) { @@ -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; }