forked from platypush/platypush
quit method implemented as part of the media interface
This commit is contained in:
parent
ed4b7e1da9
commit
c18650c964
2 changed files with 13 additions and 0 deletions
platypush/plugins/media
|
@ -150,6 +150,10 @@ class MediaPlugin(Plugin):
|
|||
def stop(self, *args, **kwargs):
|
||||
raise self._NOT_IMPLEMENTED_ERR
|
||||
|
||||
@action
|
||||
def quit(self, *args, **kwargs):
|
||||
raise self._NOT_IMPLEMENTED_ERR
|
||||
|
||||
@action
|
||||
def voldown(self, *args, **kwargs):
|
||||
raise self._NOT_IMPLEMENTED_ERR
|
||||
|
|
|
@ -79,6 +79,14 @@ class MediaOmxplayerPlugin(MediaPlugin):
|
|||
@action
|
||||
def stop(self):
|
||||
""" Stop the playback """
|
||||
if self._player:
|
||||
self._player.stop()
|
||||
|
||||
return {'status':'stop'}
|
||||
|
||||
@action
|
||||
def quit(self):
|
||||
""" Quit the player """
|
||||
if self._player:
|
||||
self._player.stop()
|
||||
self._player.quit()
|
||||
|
@ -86,6 +94,7 @@ class MediaOmxplayerPlugin(MediaPlugin):
|
|||
|
||||
return {'status':'stop'}
|
||||
|
||||
|
||||
@action
|
||||
def voldown(self):
|
||||
""" Volume down by 10% """
|
||||
|
|
Loading…
Reference in a new issue