diff --git a/platypush/plugins/media/__init__.py b/platypush/plugins/media/__init__.py index 0d869f70..5598c3b0 100644 --- a/platypush/plugins/media/__init__.py +++ b/platypush/plugins/media/__init__.py @@ -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 diff --git a/platypush/plugins/media/omxplayer.py b/platypush/plugins/media/omxplayer.py index b3aa83e9..ae50d062 100644 --- a/platypush/plugins/media/omxplayer.py +++ b/platypush/plugins/media/omxplayer.py @@ -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% """