From 9492243fd5b408642188d3bf39393f89e418a692 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 24 Apr 2018 14:54:01 +0200 Subject: [PATCH] Transform a [0,100] volume range in the volume range expected by the OMXPlayer API --- platypush/plugins/video/omxplayer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platypush/plugins/video/omxplayer.py b/platypush/plugins/video/omxplayer.py index 96df27f8e..9da2d36ec 100644 --- a/platypush/plugins/video/omxplayer.py +++ b/platypush/plugins/video/omxplayer.py @@ -128,6 +128,8 @@ class VideoOmxplayerPlugin(Plugin): return self.status() def set_volume(self, volume): + # Transform a [0,100] value to an OMXPlayer volume in [-6000,0] + volume = 60.0*volume - 6000 if self.player: self.player.set_volume(volume) return self.status()