forked from openlp/openlp
convert video api to registered controller
This commit is contained in:
parent
e24c588df3
commit
34b4828c30
@ -350,7 +350,7 @@ class MediaController(object):
|
|||||||
"""
|
"""
|
||||||
player.resize(display)
|
player.resize(display)
|
||||||
|
|
||||||
def video(self, controller, serviceItem, muted, isBackground,
|
def video(self, source, serviceItem, muted, isBackground,
|
||||||
hidden=False):
|
hidden=False):
|
||||||
"""
|
"""
|
||||||
Loads and starts a video to run with the option of sound
|
Loads and starts a video to run with the option of sound
|
||||||
@ -369,6 +369,7 @@ class MediaController(object):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'video')
|
log.debug(u'video')
|
||||||
isValid = False
|
isValid = False
|
||||||
|
controller = self.displayControllers[source]
|
||||||
# stop running videos
|
# stop running videos
|
||||||
self.media_reset(controller)
|
self.media_reset(controller)
|
||||||
controller.media_info = MediaInfo()
|
controller.media_info = MediaInfo()
|
||||||
|
@ -1355,7 +1355,8 @@ class SlideController(DisplayController):
|
|||||||
Respond to the arrival of a media service item
|
Respond to the arrival of a media service item
|
||||||
"""
|
"""
|
||||||
log.debug(u'SlideController onMediaStart')
|
log.debug(u'SlideController onMediaStart')
|
||||||
self.mediaController.video(self, item, False, False, self.hideMode())
|
self.mediaController.video(self.controllerType, item, False, False, \
|
||||||
|
self.hideMode())
|
||||||
if not self.isLive:
|
if not self.isLive:
|
||||||
self.previewDisplay.show()
|
self.previewDisplay.show()
|
||||||
self.slidePreview.hide()
|
self.slidePreview.hide()
|
||||||
|
@ -175,7 +175,7 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
(path, name) = os.path.split(filename)
|
(path, name) = os.path.split(filename)
|
||||||
service_item.add_from_command(path, name,CLAPPERBOARD)
|
service_item.add_from_command(path, name,CLAPPERBOARD)
|
||||||
if self.plugin.liveController.mediaController.video(
|
if self.plugin.liveController.mediaController.video(
|
||||||
self.plugin.liveController, service_item, True, True):
|
DisplayControllerType.Live, service_item, True, True):
|
||||||
self.resetAction.setVisible(True)
|
self.resetAction.setVisible(True)
|
||||||
else:
|
else:
|
||||||
critical_error_message_box(UiStrings().LiveBGError,
|
critical_error_message_box(UiStrings().LiveBGError,
|
||||||
|
Loading…
Reference in New Issue
Block a user