forked from platypush/platypush
Transform a [0,100] volume range in the volume range expected by the OMXPlayer API
This commit is contained in:
parent
dd254b65cb
commit
9492243fd5
1 changed files with 2 additions and 0 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue