From fdcb8ae0c7c9a1d7dcc0c133d79621b1d16f63ff Mon Sep 17 00:00:00 2001 From: Jonathan Springer Date: Mon, 29 May 2017 12:31:14 -0400 Subject: [PATCH] Use media controller methods to pause and play media when hiding, blanking, and unblanking display to keep UI in sync with media state. --- openlp/core/ui/media/mediacontroller.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openlp/core/ui/media/mediacontroller.py b/openlp/core/ui/media/mediacontroller.py index 8178e0ced..1723105a8 100644 --- a/openlp/core/ui/media/mediacontroller.py +++ b/openlp/core/ui/media/mediacontroller.py @@ -822,7 +822,7 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties): display = self._define_display(self.live_controller) if self.live_controller.controller_type in self.current_media_players and \ self.current_media_players[self.live_controller.controller_type].get_live_state() == MediaState.Playing: - self.current_media_players[self.live_controller.controller_type].pause(display) + self.media_pause(display.controller) self.current_media_players[self.live_controller.controller_type].set_visible(display, False) def media_blank(self, msg): @@ -840,7 +840,7 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties): display = self._define_display(self.live_controller) if self.live_controller.controller_type in self.current_media_players and \ self.current_media_players[self.live_controller.controller_type].get_live_state() == MediaState.Playing: - self.current_media_players[self.live_controller.controller_type].pause(display) + self.media_pause(display.controller) self.current_media_players[self.live_controller.controller_type].set_visible(display, False) def media_unblank(self, msg): @@ -858,7 +858,7 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties): if self.live_controller.controller_type in self.current_media_players and \ self.current_media_players[self.live_controller.controller_type].get_live_state() != \ MediaState.Playing: - if self.current_media_players[self.live_controller.controller_type].play(display): + if self.media_play(display.controller): self.current_media_players[self.live_controller.controller_type].set_visible(display, True) # Start Timer for ui updates if not self.live_timer.isActive():