From 88d34ded021ac61e2440720fd3deb2cf3eef21e4 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Tue, 4 Jan 2022 14:05:24 +0100 Subject: Added playback volume notification to player mock --- notifier.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'notifier.py') diff --git a/notifier.py b/notifier.py index 42ab529..99be1ce 100644 --- a/notifier.py +++ b/notifier.py @@ -8,6 +8,7 @@ class Notifier: self._callbacks = dict() self._player = player self._player.setPlayingStateChangedCallback(self._playingStateChangedCallback) + self._player.setPlaybackVolumeChangedCallback(self._playbackVolumeChangedCallback) def registerCallback(self, event, callback): if event not in self._callbacks: @@ -20,3 +21,7 @@ class Notifier: def _playingStateChangedCallback(self, *args): self.notify(Notifier.PLAYING_STATE_EVENT) + + def _playbackVolumeChangedCallback(self, *args): + self.notify(Notifier.PLAYBACK_VOLUME_EVENT) + -- cgit v1.2.3