diff --git a/openlp/core/lib/htmlbuilder.py b/openlp/core/lib/htmlbuilder.py index 9ee3e992f..9bce2bcac 100644 --- a/openlp/core/lib/htmlbuilder.py +++ b/openlp/core/lib/htmlbuilder.py @@ -506,25 +506,3 @@ def build_footer_css(item, height): item.footer.width(), theme.font_footer_name, theme.font_footer_size, theme.font_footer_color) return lyrics_html - -def build_alert_css(alertTab): - """ - Build the display of the footer - - ``alertTab`` - Details from the Alert tab for fonts etc - """ - style = u""" - width: 100%%; - vertical-align: %s; - font-family: %s; - font-size: %spt; - color: %s; - background-color: %s; - """ - if not alertTab: - return u'' - align = VerticalType.Names[alertTab.location] - alert = style % (align, alertTab.font_face, alertTab.font_size, - alertTab.font_color, alertTab.bg_color) - return alert diff --git a/openlp/core/lib/renderer.py b/openlp/core/lib/renderer.py index 78430e19e..04f76f363 100644 --- a/openlp/core/lib/renderer.py +++ b/openlp/core/lib/renderer.py @@ -31,7 +31,7 @@ from PyQt4 import QtGui, QtCore, QtWebKit from openlp.core.lib import ServiceItem, expand_tags, \ build_lyrics_format_css, build_lyrics_outline_css, Receiver, \ - ItemCapabilities, FormattingTags, PluginManager + ItemCapabilities, FormattingTags from openlp.core.lib.theme import ThemeLevel from openlp.core.ui import MainDisplay, ScreenList @@ -69,7 +69,6 @@ class Renderer(object): log.debug(u'Initialisation started') self.themeManager = themeManager self.imageManager = imageManager - self.plugins = PluginManager.get_instance().plugins self.screens = ScreenList.get_instance() self.service_theme = u'' self.theme_level = u'' diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py index d281329f4..b3279c9b9 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -46,7 +46,9 @@ log = logging.getLogger(__name__) class Display(QtGui.QGraphicsView): """ - This is a general display screen class. + This is a general display screen class. Here the general display settings + will done. It will be used as specialized classes by Main Display and + Preview display. """ def __init__(self, parent, live, controller): if live: @@ -57,38 +59,51 @@ class Display(QtGui.QGraphicsView): QtGui.QGraphicsView.__init__(self, parent) self.isLive = live self.controller = controller + self.screen = None self.plugins = PluginManager.get_instance().plugins self.setViewport(QtOpenGL.QGLWidget()) def setup(self): """ - Set up and build the preview screen + Set up and build the screen base """ + log.debug(u'Start Display base setup (live = %s)' % self.isLive) + self.setGeometry(self.screen[u'size']) + log.debug(u'Setup webView') self.webView = QtWebKit.QWebView(self) self.webView.setGeometry(0, 0, - self.width(), self.height()) + self.screen[u'size'].width(), self.screen[u'size'].height()) self.webView.settings().setAttribute( QtWebKit.QWebSettings.PluginsEnabled, True) self.page = self.webView.page() self.frame = self.page.mainFrame() + if self.isLive and log.getEffectiveLevel() == logging.DEBUG: + self.webView.settings().setAttribute( + QtWebKit.QWebSettings.DeveloperExtrasEnabled, True) + QtCore.QObject.connect(self.webView, + QtCore.SIGNAL(u'loadFinished(bool)'), self.isWebLoaded) + self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) + self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.frame.setScrollBarPolicy(QtCore.Qt.Vertical, QtCore.Qt.ScrollBarAlwaysOff) self.frame.setScrollBarPolicy(QtCore.Qt.Horizontal, QtCore.Qt.ScrollBarAlwaysOff) - screen = {} - screen[u'size'] = self.size() - serviceItem = ServiceItem() - self.webView.setHtml(build_html(serviceItem, screen, - None, self.isLive, None)) - self.webView.hide() def resizeEvent(self, ev): self.webView.setGeometry(0, 0, self.width(), self.height()) + def isWebLoaded(self): + """ + Called by webView event to show display is fully loaded + """ + log.debug(u'Webloaded') + self.webLoaded = True + + class MainDisplay(Display): """ - This is the display screen. + This is the display screen as a specialized class from the Display class """ def __init__(self, parent, imageManager, live, controller): Display.__init__(self, parent, live, controller) @@ -149,26 +164,7 @@ class MainDisplay(Display): log.debug(u'Start MainDisplay setup (live = %s)' % self.isLive) self.screen = self.screens.current self.setVisible(False) - self.setGeometry(self.screen[u'size']) - log.debug(u'Setup webView') - self.webView = QtWebKit.QWebView(self) - self.webView.setGeometry(0, 0, - self.screen[u'size'].width(), self.screen[u'size'].height()) - self.webView.settings().setAttribute( - QtWebKit.QWebSettings.PluginsEnabled, True) - self.page = self.webView.page() - self.frame = self.page.mainFrame() - if self.isLive and log.getEffectiveLevel() == logging.DEBUG: - self.webView.settings().setAttribute( - QtWebKit.QWebSettings.DeveloperExtrasEnabled, True) - QtCore.QObject.connect(self.webView, - QtCore.SIGNAL(u'loadFinished(bool)'), self.isWebLoaded) - self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) - self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) - self.frame.setScrollBarPolicy(QtCore.Qt.Vertical, - QtCore.Qt.ScrollBarAlwaysOff) - self.frame.setScrollBarPolicy(QtCore.Qt.Horizontal, - QtCore.Qt.ScrollBarAlwaysOff) + Display.setup(self) if self.isLive: # Build the initial frame. image_file = QtCore.QSettings().value(u'advanced/default image', diff --git a/openlp/core/ui/media/__init__.py b/openlp/core/ui/media/__init__.py index 18b384848..3ce8b6707 100644 --- a/openlp/core/ui/media/__init__.py +++ b/openlp/core/ui/media/__init__.py @@ -27,8 +27,8 @@ class MediaState(object): """ - An enumeration for possible States of the Media Player - (copied partially from Phonon::State) + An enumeration for possible States of the Media Player (copied partially + from Phonon::State) """ Loading = 0 Stopped = 1 diff --git a/openlp/core/ui/media/media_api.py b/openlp/core/ui/media/media_api.py index 7fb913efd..265126db0 100644 --- a/openlp/core/ui/media/media_api.py +++ b/openlp/core/ui/media/media_api.py @@ -29,11 +29,11 @@ from openlp.core.ui.media import MediaState class MediaAPI(object): """ - A generic media API class to provide OpenLP - with a pluggable media display framework. + A generic media API class to provide OpenLP with a pluggable media display + framework. """ - def __init__(self, parent, name=u'MediaApi'): + def __init__(self, parent, name=u'media_api'): self.parent = parent self.name = name self.available = self.check_available() @@ -65,8 +65,8 @@ class MediaAPI(object): def resize(self, display): """ - If the main display size or position is changed, - the media widgets should also resized + If the main display size or position is changed, the media widgets + should also resized """ pass @@ -114,8 +114,7 @@ class MediaAPI(object): def update_ui(self, display): """ - Do some ui related stuff - (e.g. update the seek slider) + Do some ui related stuff (e.g. update the seek slider) """ pass diff --git a/openlp/core/ui/media/mediacontroller.py b/openlp/core/ui/media/mediacontroller.py index f5151bb5d..e1bcd0eef 100644 --- a/openlp/core/ui/media/mediacontroller.py +++ b/openlp/core/ui/media/mediacontroller.py @@ -39,14 +39,13 @@ log = logging.getLogger(__name__) class MediaController(object): """ - The implementation of the Media Controller - The Media Controller adds an own class for every API - Currently these are QtWebkit, Phonon and planed Vlc. + The implementation of the Media Controller. The Media Controller adds an own + class for every API. Currently these are QtWebkit, Phonon and planed Vlc. """ def __init__(self, parent): self.parent = parent - self.APIs = {} + self.mediaApis = {} self.controller = [] self.overridenApi = '' self.curDisplayMediaAPI = {} @@ -59,15 +58,15 @@ class MediaController(object): QtCore.QObject.connect(self.timer, QtCore.SIGNAL("timeout()"), self.video_state) QtCore.QObject.connect(Receiver.get_receiver(), - QtCore.SIGNAL(u'Media Start'), self.video_play) + QtCore.SIGNAL(u'media_playback_play'), self.video_play) QtCore.QObject.connect(Receiver.get_receiver(), - QtCore.SIGNAL(u'Media Pause'), self.video_pause) + QtCore.SIGNAL(u'media_playback_pause'), self.video_pause) QtCore.QObject.connect(Receiver.get_receiver(), - QtCore.SIGNAL(u'Media Stop'), self.video_stop) + QtCore.SIGNAL(u'media_playback_stop'), self.video_stop) QtCore.QObject.connect(Receiver.get_receiver(), - QtCore.SIGNAL(u'seekSlider'), self.video_seek) + QtCore.SIGNAL(u'seek_slider'), self.video_seek) QtCore.QObject.connect(Receiver.get_receiver(), - QtCore.SIGNAL(u'volumeSlider'), self.video_volume) + QtCore.SIGNAL(u'volume_slider'), self.video_volume) QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'media_hide'), self.video_hide) QtCore.QObject.connect(Receiver.get_receiver(), @@ -75,7 +74,7 @@ class MediaController(object): QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'media_unblank'), self.video_unblank) QtCore.QObject.connect(Receiver.get_receiver(), - QtCore.SIGNAL(u'media_overrideApi'), self.override_api) + QtCore.SIGNAL(u'media_override_api'), self.override_api) # Signals for background video QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'songs_hide'), self.video_hide) @@ -84,16 +83,16 @@ class MediaController(object): def register_controllers(self, controller): """ - Register each media API controller (Webkit, Phonon, etc) and - store for later use + Register each media API controller (Webkit, Phonon, etc) and store for + later use """ if controller.check_available(): - self.APIs[controller.name] = controller + self.mediaApis[controller.name] = controller def check_available_media_apis(self): """ - Check to see if we have any media API's available - If Not do not install the plugin. + Check to see if we have any media API's available. If Not do not install + the plugin. """ log.debug(u'check_available_media_apis') controller_dir = os.path.join( @@ -116,17 +115,26 @@ class MediaController(object): for controller_class in controller_classes: controller = controller_class(self) self.register_controllers(controller) - if self.APIs: + if self.mediaApis: + apiSettings = str(QtCore.QSettings().value(u'media/apis', + QtCore.QVariant(u'webkit')).toString()) + savedAPIs = apiSettings.split(u',') + invalidMediaAPIs = [mediaApi for mediaApi in savedAPIs \ + if not mediaApi in self.mediaApis] + if len(invalidMediaAPIs)>0: + [savedAPIs.remove(invalidApi) for invalidApi in invalidMediaAPIs] + newApiSetting = u','.join(savedAPIs) + QtCore.QSettings().setValue(u'media/apis', + QtCore.QVariant(newApiSetting)) return True else: return False def video_state(self): """ - Check if there is an assigned media API and do some - updating stuff (e.g. update the UI) + Check if there is a running media Player and do updating stuff (e.g. + update the UI) """ - isAnyonePlaying = False if len(self.curDisplayMediaAPI.keys()) == 0: self.timer.stop() else: @@ -135,16 +143,15 @@ class MediaController(object): self.curDisplayMediaAPI[display].update_ui(display) if self.curDisplayMediaAPI[display] \ .state == MediaState.Playing: - isAnyonePlaying = True - if not isAnyonePlaying: - self.timer.stop() + return + self.timer.stop() def get_media_display_css(self): """ Add css style sheets to htmlbuilder """ css = u'' - for api in self.APIs.values(): + for api in self.mediaApis.values(): css += api.get_media_display_css() return css @@ -153,7 +160,7 @@ class MediaController(object): Add javascript functions to htmlbuilder """ js = u'' - for api in self.APIs.values(): + for api in self.mediaApis.values(): js += api.get_media_display_javascript() return js @@ -162,30 +169,32 @@ class MediaController(object): Add html code to htmlbuilder """ html = u'' - for api in self.APIs.values(): + for api in self.mediaApis.values(): html += api.get_media_display_html() return html def add_controller_items(self, controller, control_panel): self.controller.append(controller) self.setup_generic_controls(controller, control_panel) - for api in self.APIs.values(): - api.setup_controls(controller, control_panel) + self.setup_special_controls(controller, control_panel) def setup_generic_controls(self, controller, control_panel): + """ + Add generic media control items (valid for all types of medias) + """ controller.media_info = MediaInfo() # Build a Media ToolBar controller.mediabar = OpenLPToolbar(controller) controller.mediabar.addToolbarButton( - u'Media Start', u':/slides/media_playback_start.png', + u'media_playback_play', u':/slides/media_playback_start.png', translate('OpenLP.SlideController', 'Start playing media'), controller.sendToPlugins) controller.mediabar.addToolbarButton( - u'Media Pause', u':/slides/media_playback_pause.png', + u'media_playback_pause', u':/slides/media_playback_pause.png', translate('OpenLP.SlideController', 'Pause playing media'), controller.sendToPlugins) controller.mediabar.addToolbarButton( - u'Media Stop', u':/slides/media_playback_stop.png', + u'media_playback_stop', u':/slides/media_playback_stop.png', translate('OpenLP.SlideController', 'Stop playing media'), controller.sendToPlugins) # Build the seekSlider. @@ -194,8 +203,9 @@ class MediaController(object): controller.seekSlider.setToolTip(translate( 'OpenLP.SlideController', 'Video position.')) controller.seekSlider.setGeometry(QtCore.QRect(90, 260, 221, 24)) - controller.seekSlider.setObjectName(u'seekSlider') - controller.mediabar.addToolbarWidget(u'Seek Slider', controller.seekSlider) + controller.seekSlider.setObjectName(u'seek_slider') + controller.mediabar.addToolbarWidget(u'Seek Slider', + controller.seekSlider) # Build the volumeSlider. controller.volumeSlider = QtGui.QSlider(QtCore.Qt.Horizontal) controller.volumeSlider.setTickInterval(10) @@ -206,8 +216,9 @@ class MediaController(object): 'OpenLP.SlideController', 'Audio Volume.')) controller.volumeSlider.setValue(controller.media_info.volume) controller.volumeSlider.setGeometry(QtCore.QRect(90, 160, 221, 24)) - controller.volumeSlider.setObjectName(u'volumeSlider') - controller.mediabar.addToolbarWidget(u'Audio Volume', controller.volumeSlider) + controller.volumeSlider.setObjectName(u'volume_slider') + controller.mediabar.addToolbarWidget(u'Audio Volume', + controller.volumeSlider) control_panel.addWidget(controller.mediabar) controller.mediabar.setVisible(False) # Signals @@ -216,10 +227,17 @@ class MediaController(object): QtCore.QObject.connect(controller.volumeSlider, QtCore.SIGNAL(u'sliderMoved(int)'), controller.sendToPlugins) + def setup_special_controls(self, controller, control_panel): + """ + Special media Toolbars will be created here (e.g. for DVD Playback) + """ + controller.media_info = MediaInfo() + # TODO: add Toolbar for DVD, ... + def setup_display(self, display): """ - After a new display is configured, all media related widget - will be created too + After a new display is configured, all media related widget will be + created too """ # clean up possible running old media files self.finalise() @@ -230,21 +248,20 @@ class MediaController(object): if display == self.parent.previewController.previewDisplay or \ display == self.parent.liveController.previewDisplay: display.hasAudio = False - for api in self.APIs.values(): + for api in self.mediaApis.values(): api.setup(display) def set_controls_visible(self, controller, value): # Generic controls controller.mediabar.setVisible(value) - # Special controls + # Special controls: Here media type specific Controls will be enabled + # (e.g. for DVD control, ...) # TODO -# for api in self.APIs.values(): -# api.setup_controls(controller, control_panel) def resize(self, controller, display, api): """ - After Mainwindow changes or Splitter moved all related media - widgets have to be resized + After Mainwindow changes or Splitter moved all related media widgets + have to be resized """ api.resize(display) @@ -285,7 +302,6 @@ class MediaController(object): 'Unsupported File'))) return False # now start playing - display.frame.evaluateJavaScript(u'show_blank("black");') if self.video_play([controller], False): self.video_pause([controller]) self.video_seek([controller, [0]]) @@ -295,6 +311,10 @@ class MediaController(object): controller.media_info.is_background == True) or \ controller.isLive == False: self.video_play([controller]) + if controller.isLive and ( \ + controller.media_info.is_background == False): + display.frame.evaluateJavaScript(u'show_video( \ + "setBackBoard", null, null, null,"visible");') self.set_controls_visible(controller, True) log.debug(u'use %s controller' % self.curDisplayMediaAPI[display]) return True @@ -307,20 +327,19 @@ class MediaController(object): def check_file_type(self, controller, display): """ - Used to choose the right media API type - from the prioritized API list + Used to choose the right media API type from the prioritized API list """ apiSettings = str(QtCore.QSettings().value(u'media/apis', - QtCore.QVariant(u'Webkit')).toString()) + QtCore.QVariant(u'webkit')).toString()) usedAPIs = apiSettings.split(u',') if QtCore.QSettings().value(u'media/override api', QtCore.QVariant(QtCore.Qt.Unchecked)) == QtCore.Qt.Checked: if self.overridenApi != '': usedAPIs = [self.overridenApi] if controller.media_info.file_info.isFile(): - suffix = u'*.%s' % controller.media_info.file_info.suffix() + suffix = u'*.%s' % controller.media_info.file_info.suffix().toLower() for title in usedAPIs: - api = self.APIs[title] + api = self.mediaApis[title] if suffix in api.video_extensions_list: if not controller.media_info.is_background or \ controller.media_info.is_background and api.canBackground: @@ -336,7 +355,7 @@ class MediaController(object): return True else: for title in usedAPIs: - api = self.APIs[title] + api = self.mediaApis[title] if api.canFolder: self.resize(controller, display, api) if api.load(display): @@ -421,6 +440,8 @@ class MediaController(object): display.override = {} self.curDisplayMediaAPI[display].reset(display) self.curDisplayMediaAPI[display].set_visible(display, False) + display.frame.evaluateJavaScript(u'show_video( \ + "setBackBoard", null, null, null,"hidden");') del self.curDisplayMediaAPI[display] self.set_controls_visible(controller, False) @@ -478,7 +499,7 @@ class MediaController(object): def get_audio_extensions_list(self): audio_list = [] - for api in self.APIs.values(): + for api in self.mediaApis.values(): for item in api.audio_extensions_list: if not item in audio_list: audio_list.append(item) @@ -486,7 +507,7 @@ class MediaController(object): def get_video_extensions_list(self): video_list = [] - for api in self.APIs.values(): + for api in self.mediaApis.values(): for item in api.video_extensions_list: if not item in video_list: video_list.append(item) @@ -494,7 +515,7 @@ class MediaController(object): def override_api(self, override_api): apiSettings = str(QtCore.QSettings().value(u'media/apis', - QtCore.QVariant(u'Webkit')).toString()) + QtCore.QVariant(u'webkit')).toString()) usedAPIs = apiSettings.split(u',') if override_api in usedAPIs: self.overridenApi = override_api diff --git a/openlp/core/ui/media/phononapi.py b/openlp/core/ui/media/phononapi.py index 4dbbd5b3c..0cd086ef6 100644 --- a/openlp/core/ui/media/phononapi.py +++ b/openlp/core/ui/media/phononapi.py @@ -37,16 +37,7 @@ from openlp.core.ui.media import MediaAPI, MediaState log = logging.getLogger(__name__) -class PhononAPI(MediaAPI): - """ - A specialised version of the MediaAPI class, - which provides a Phonon display. - """ - - def __init__(self, parent): - MediaAPI.__init__(self, parent, u'Phonon') - self.parent = parent - self.additional_extensions = { +ADDITIONAL_EXT = { u'audio/ac3': [u'.ac3'], u'audio/flac': [u'.flac'], u'audio/x-m4a': [u'.m4a'], @@ -61,6 +52,18 @@ class PhononAPI(MediaAPI): u'video/x-wmv': [u'.wmv'], u'video/x-mpg': [u'.mpg'], u'video/x-ms-wmv': [u'.wmv']} + + +class PhononAPI(MediaAPI): + """ + A specialised version of the MediaAPI class, which provides a Phonon + display. + """ + + def __init__(self, parent): + MediaAPI.__init__(self, parent, u'phonon') + self.parent = parent + self.additional_extensions = ADDITIONAL_EXT mimetypes.init() for mimetype in Phonon.BackendCapabilities.availableMimeTypes(): mimetype = unicode(mimetype) @@ -89,9 +92,6 @@ class PhononAPI(MediaAPI): log.info(u'MediaPlugin: %s additional extensions: %s' % (mimetype, u' '.join(self.additional_extensions[mimetype]))) - def setup_controls(self, controller, control_panel): - pass - def setup(self, display): display.phononWidget = Phonon.VideoWidget(display) display.phononWidget.resize(display.size()) diff --git a/openlp/core/ui/media/vlcapi.py b/openlp/core/ui/media/vlcapi.py index 1cbc2b466..74f89308b 100644 --- a/openlp/core/ui/media/vlcapi.py +++ b/openlp/core/ui/media/vlcapi.py @@ -30,8 +30,9 @@ import sys, os from datetime import datetime try: import vlc - vlc_available = True -except ImportError: + if vlc.get_default_instance(): + vlc_available = True +except: vlc_available = False from PyQt4 import QtCore, QtGui @@ -40,47 +41,50 @@ from openlp.core.ui.media import MediaAPI, MediaState log = logging.getLogger(__name__) +AUDIO_EXT = [ + u'*.mp3' + , u'*.wav' + , u'*.ogg' + ] + +VIDEO_EXT = [ + u'*.3gp' + , u'*.asf', u'*.wmv' + , u'*.au' + , u'*.avi' + , u'*.flv' + , u'*.mov' + , u'*.mp4' + , u'*.ogm' + , u'*.mkv', u'*.mka' + , u'*.ts', u'*.mpg' + , u'*.mpg', u'*.mp2' + , u'*.nsc' + , u'*.nsv' + , u'*.nut' + , u'*.ra', u'*.ram', u'*.rm', u'*.rv' ,u'*.rmbv' + , u'*.a52', u'*.dts', u'*.aac', u'*.flac' ,u'*.dv', u'*.vid' + , u'*.tta', u'*.tac' + , u'*.ty' + , u'*.dts' + , u'*.xa' + , u'*.iso' + , u'*.vob' + ] + + class VlcAPI(MediaAPI): """ - A specialised version of the MediaAPI class, - which provides a QtWebKit display. + A specialised version of the MediaAPI class, which provides a QtWebKit + display. """ def __init__(self, parent): - MediaAPI.__init__(self, parent, u'Vlc') + MediaAPI.__init__(self, parent, u'vlc') self.parent = parent self.canFolder = True - self.audio_extensions_list = [ - u'*.mp3' - , u'*.wav' - , u'*.ogg' - ] - self.video_extensions_list = [ - u'*.3gp' - , u'*.asf', u'*.wmv' - , u'*.au' - , u'*.avi' - , u'*.flv' - , u'*.mov' - , u'*.mp4' - , u'*.ogm' - , u'*.mkv', u'*.mka' - , u'*.ts', u'*.mpg' - , u'*.mpg', u'*.mp2' - , u'*.nsc' - , u'*.nsv' - , u'*.nut' - , u'*.ra', u'*.ram', u'*.rm', u'*.rv' ,u'*.rmbv' - , u'*.a52', u'*.dts', u'*.aac', u'*.flac' ,u'*.dv', u'*.vid' - , u'*.tta', u'*.tac' - , u'*.ty' - , u'*.dts' - , u'*.xa' - , u'*.iso' - ] - - def setup_controls(self, controller, control_panel): - pass + self.audio_extensions_list = AUDIO_EXT + self.video_extensions_list = VIDEO_EXT def setup(self, display): display.vlcWidget = QtGui.QFrame(display) diff --git a/openlp/core/ui/media/webkitapi.py b/openlp/core/ui/media/webkitapi.py index 9467a2a55..ee7a2c5b3 100644 --- a/openlp/core/ui/media/webkitapi.py +++ b/openlp/core/ui/media/webkitapi.py @@ -35,11 +35,15 @@ from openlp.core.ui.media import MediaAPI, MediaState log = logging.getLogger(__name__) VIDEO_CSS = u""" -#video1 { +#videobackboard { z-index:3; + background-color: black; +} +#video1 { + z-index:4; } #video2 { - z-index:3; + z-index:4; } """ @@ -135,11 +139,16 @@ VIDEO_JS = u""" case 'setVisible': vid.style.visibility = varVal; break; + case 'setBackBoard': + var back = document.getElementById('videobackboard'); + back.style.visibility = varVal; + break; } } """ VIDEO_HTML = u""" +