aboutsummaryrefslogtreecommitdiffstats
path: root/notifier.py
diff options
context:
space:
mode:
authorEddy Pedroni <eddy@0xf7.com>2022-01-04 14:05:24 +0100
committerEddy Pedroni <eddy@0xf7.com>2022-01-04 14:05:24 +0100
commit88d34ded021ac61e2440720fd3deb2cf3eef21e4 (patch)
treebbd56cf7361f8a4b5dccc21f71c0baba48d5c85a /notifier.py
parentc75f1ef702b1a3b5cdbbe7f1a87e0f0fbfa80e39 (diff)
Added playback volume notification to player mock
Diffstat (limited to 'notifier.py')
-rw-r--r--notifier.py5
1 files changed, 5 insertions, 0 deletions
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)
+