diff --git a/platypush/plugins/media/chromecast.py b/platypush/plugins/media/chromecast.py index ae8c80d2..99530228 100644 --- a/platypush/plugins/media/chromecast.py +++ b/platypush/plugins/media/chromecast.py @@ -178,6 +178,56 @@ class MediaChromecastPlugin(Plugin): return None + @action + def play(self, chromecast=None): + return self.get_chromecast(chromecast or self.chromecast).play() + + + @action + def pause(self, chromecast=None): + return self.get_chromecast(chromecast or self.chromecast).pause() + + + @action + def stop(self, chromecast=None): + return self.get_chromecast(chromecast or self.chromecast).stop() + + + @action + def rewind(self, chromecast=None): + return self.get_chromecast(chromecast or self.chromecast).rewind() + + + @action + def seek(self, location, chromecast=None): + return self.get_chromecast(chromecast or self.chromecast).seek(location) + + + @action + def is_playing(self, chromecast=None): + return self.get_chromecast(chromecast or self.chromecast).is_playing + + + @action + def is_paused(self, chromecast=None): + return self.get_chromecast(chromecast or self.chromecast).is_paused + + + @action + def enable_subtitle(self, chromecast=None): + return self.get_chromecast(chromecast or self.chromecast).enable_subtitle + + + @action + def disable_subtitle(self, chromecast=None): + return self.get_chromecast(chromecast or self.chromecast).disable_subtitle + + + @action + def status(self, chromecast=None): + return self.get_chromecast(chromecast or self.chromecast).status + + @action def disconnect(self, chromecast=None, timeout=None, blocking=True): """