← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/bug-1022039 into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/bug-1022039 into lp:openlp.

Requested reviews:
  Jonathan Corwin (j-corwin)
Related bugs:
  Bug #1022039 in OpenLP: "Inconsistency media and backing track controls "
  https://bugs.launchpad.net/openlp/+bug/1022039

For more details, see:
https://code.launchpad.net/~trb143/openlp/bug-1022039/+merge/123432

If live trigger the same signal as the push of the play button would trigger.
Tested on VLC, Webkit, Phonon with MOV and wma files
-- 
https://code.launchpad.net/~trb143/openlp/bug-1022039/+merge/123432
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/media/mediacontroller.py'
--- openlp/core/ui/media/mediacontroller.py	2012-08-05 18:17:52 +0000
+++ openlp/core/ui/media/mediacontroller.py	2012-09-08 18:40:27 +0000
@@ -287,7 +287,7 @@
         """
         player.resize(display)
 
-    def video(self, controller, file, muted, isBackground):
+    def video(self, controller, file, muted, isBackground, hidden=False):
         """
         Loads and starts a video to run with the option of sound
         """
@@ -333,11 +333,19 @@
         if controller.isLive and not controller.media_info.is_background:
             display.frame.evaluateJavaScript(u'show_video( \
             "setBackBoard", null, null, null,"visible");')
-        # now start playing
-        if controller.isLive and \
-            (Settings().value(u'general/auto unblank',
-            QtCore.QVariant(False)).toBool() or \
-            controller.media_info.is_background) or not controller.isLive:
+        # now start playing - Preview is autoplay!
+        autoplay = False
+        # Preview requested
+        if not controller.isLive:
+            autoplay = True
+        # Visible or background requested
+        elif not hidden or controller.media_info.is_background:
+            autoplay = True
+        # Unblank on load set
+        elif Settings().value(u'general/auto unblank',
+            QtCore.QVariant(False)).toBool():
+            autoplay = True
+        if autoplay:
             if not self.video_play([controller]):
                 critical_error_message_box(
                     translate('MediaPlugin.MediaItem', 'Unsupported File'),

=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2012-08-18 10:55:57 +0000
+++ openlp/core/ui/slidecontroller.py	2012-09-08 18:40:27 +0000
@@ -1347,7 +1347,7 @@
         """
         log.debug(u'SlideController onMediaStart')
         file = os.path.join(item.get_frame_path(), item.get_frame_title())
-        self.mediaController.video(self, file, False, False)
+        self.mediaController.video(self, file, False, False, self.hideMode())
         if not self.isLive or self.mediaController.withLivePreview:
             self.previewDisplay.show()
             self.slidePreview.hide()


Follow ups