✨ Sound effects on notifications
This commit is contained in:
@@ -70,13 +70,10 @@ StreamSubscription<WebSocketPacket> setupNotificationListener(
|
||||
}
|
||||
if (settings.soundEffects) {
|
||||
final player = AudioPlayer();
|
||||
player
|
||||
.setAudioSource(
|
||||
AudioSource.asset('assets/audio/notification.mp3'),
|
||||
)
|
||||
.then((_) {
|
||||
player.play().then((_) => player.dispose());
|
||||
});
|
||||
await player.setVolume(0.75);
|
||||
await player.setAudioSource(AudioSource.asset('assets/audio/notification.mp3'));
|
||||
await player.play();
|
||||
player.dispose();
|
||||
}
|
||||
showTopSnackBar(
|
||||
globalOverlay.currentState!,
|
||||
@@ -224,4 +221,4 @@ Future<void> _putTokenToRemote(
|
||||
"/ring/notifications/subscription",
|
||||
data: {"provider": provider, "device_token": token},
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user