forked from openlp/openlp
review changes part 2
This commit is contained in:
parent
c608301b0b
commit
2c5bc34968
@ -53,8 +53,8 @@ body {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
width: 100%%;//%spx;
|
||||
height: 100%%;//%spx;
|
||||
width: 100%%;
|
||||
height: 100%%;
|
||||
}
|
||||
#black {
|
||||
z-index: 8;
|
||||
@ -285,9 +285,8 @@ def build_html(item, screen, alert, islive, background, plugins=None, \
|
||||
js_additions += plugin.getDisplayJavaScript()
|
||||
html_additions += plugin.getDisplayHtml()
|
||||
html = HTMLSRC % (build_background_css(item, width, height),
|
||||
width, height,
|
||||
css_additions,
|
||||
build_alert_css(alert, width),
|
||||
build_alert_css(alert),
|
||||
build_footer_css(item, height),
|
||||
build_lyrics_css(item, webkitvers),
|
||||
u'true' if theme and theme.display_slide_transition and islive \
|
||||
@ -555,7 +554,7 @@ def build_footer_css(item, height):
|
||||
theme.font_footer_size, theme.font_footer_color)
|
||||
return lyrics_html
|
||||
|
||||
def build_alert_css(alertTab, width):
|
||||
def build_alert_css(alertTab):
|
||||
"""
|
||||
Build the display of the footer
|
||||
|
||||
@ -563,7 +562,7 @@ def build_alert_css(alertTab, width):
|
||||
Details from the Alert tab for fonts etc
|
||||
"""
|
||||
style = u"""
|
||||
width: %spx;
|
||||
width: 100%%;
|
||||
vertical-align: %s;
|
||||
font-family: %s;
|
||||
font-size: %spt;
|
||||
@ -573,6 +572,6 @@ def build_alert_css(alertTab, width):
|
||||
if not alertTab:
|
||||
return u''
|
||||
align = VerticalType.Names[alertTab.location]
|
||||
alert = style % (width, align, alertTab.font_face, alertTab.font_size,
|
||||
alert = style % (align, alertTab.font_face, alertTab.font_size,
|
||||
alertTab.font_color, alertTab.bg_color)
|
||||
return alert
|
||||
|
@ -168,7 +168,7 @@ class Plugin(QtCore.QObject):
|
||||
self.mediadock = plugin_helpers[u'toolbox']
|
||||
self.pluginManager = plugin_helpers[u'pluginmanager']
|
||||
self.formparent = plugin_helpers[u'formparent']
|
||||
self.mediaManager = plugin_helpers[u'mediacontroller']
|
||||
self.mediaController = plugin_helpers[u'mediacontroller']
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'%s_add_service_item' % self.name),
|
||||
self.processAddServiceEvent)
|
||||
|
@ -253,7 +253,7 @@ class MainDisplay(Display):
|
||||
"""
|
||||
log.debug(u'image to display')
|
||||
image = self.imageManager.get_image_bytes(name)
|
||||
self.controller.mediaManager.video_reset(self.controller)
|
||||
self.controller.mediaController.video_reset(self.controller)
|
||||
self.displayImage(image)
|
||||
return self.preview()
|
||||
|
||||
|
@ -148,7 +148,7 @@ class Ui_MainWindow(object):
|
||||
self.defaultThemeLabel = QtGui.QLabel(self.statusBar)
|
||||
self.defaultThemeLabel.setObjectName(u'defaultThemeLabel')
|
||||
self.statusBar.addPermanentWidget(self.defaultThemeLabel)
|
||||
# Create the MediaController
|
||||
# Create the MediaManager
|
||||
self.mediaManagerDock = OpenLPDockWidget(mainWindow,
|
||||
u'mediaManagerDock', u':/system/system_mediamanager.png')
|
||||
self.mediaManagerDock.setStyleSheet(MEDIA_MANAGER_STYLE)
|
||||
@ -557,7 +557,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
self.pluginManager = PluginManager(pluginpath)
|
||||
self.pluginHelpers = {}
|
||||
self.imageManager = ImageManager()
|
||||
self.mediaManager = MediaController(self)
|
||||
self.mediaController = MediaController(self)
|
||||
# Set up the interface
|
||||
self.setupUi(self)
|
||||
# Load settings after setupUi so default UI sizes are overwritten
|
||||
@ -646,7 +646,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
self.pluginHelpers[u'toolbox'] = self.mediaDockManager
|
||||
self.pluginHelpers[u'pluginmanager'] = self.pluginManager
|
||||
self.pluginHelpers[u'formparent'] = self
|
||||
self.pluginHelpers[u'mediacontroller'] = self.mediaManager
|
||||
self.pluginHelpers[u'mediacontroller'] = self.mediaController
|
||||
self.pluginManager.find_plugins(pluginpath, self.pluginHelpers)
|
||||
# hook methods have to happen after find_plugins. Find plugins needs
|
||||
# the controllers hence the hooks have moved from setupUI() to here
|
||||
|
@ -34,6 +34,186 @@ from openlp.core.ui.media import MediaAPI, MediaState
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
video_css = u"""
|
||||
#video1 {
|
||||
z-index:3;
|
||||
}
|
||||
#video2 {
|
||||
z-index:3;
|
||||
}
|
||||
"""
|
||||
|
||||
video_js = u"""
|
||||
var video_timer = null;
|
||||
var current_video = '1';
|
||||
|
||||
function show_video(state, path, volume, loop, varVal){
|
||||
// Note, the preferred method for looping would be to use the
|
||||
// video tag loop attribute.
|
||||
// But QtWebKit doesn't support this. Neither does it support the
|
||||
// onended event, hence the setInterval()
|
||||
// In addition, setting the currentTime attribute to zero to restart
|
||||
// the video raises an INDEX_SIZE_ERROR: DOM Exception 1
|
||||
// To complicate it further, sometimes vid.currentTime stops
|
||||
// slightly short of vid.duration and vid.ended is intermittent!
|
||||
//
|
||||
// Note, currently the background may go black between loops. Not
|
||||
// desirable. Need to investigate using two <video>'s, and hiding/
|
||||
// preloading one, and toggle between the two when looping.
|
||||
|
||||
if(current_video=='1'){
|
||||
var vid = document.getElementById('video1');
|
||||
var vid2 = document.getElementById('video2');
|
||||
} else {
|
||||
var vid = document.getElementById('video2');
|
||||
var vid2 = document.getElementById('video1');
|
||||
}
|
||||
if(volume != null){
|
||||
vid.volume = volume;
|
||||
vid2.volume = volume;
|
||||
}
|
||||
switch(state){
|
||||
case 'init':
|
||||
vid.src = path;
|
||||
vid2.src = path;
|
||||
if(loop == null) loop = false;
|
||||
vid.looping = loop;
|
||||
vid2.looping = loop;
|
||||
vid.load();
|
||||
break;
|
||||
case 'load':
|
||||
vid2.style.visibility = 'hidden';
|
||||
vid2.load();
|
||||
break;
|
||||
case 'play':
|
||||
vid.play();
|
||||
//vid.style.visibility = 'visible';
|
||||
if(vid.looping){
|
||||
video_timer = setInterval(
|
||||
function() {
|
||||
show_video('poll');
|
||||
}, 200);
|
||||
}
|
||||
break;
|
||||
case 'pause':
|
||||
if(video_timer!=null){
|
||||
clearInterval(video_timer);
|
||||
video_timer = null;
|
||||
}
|
||||
vid.pause();
|
||||
break;
|
||||
case 'stop':
|
||||
show_video('pause');
|
||||
break;
|
||||
case 'poll':
|
||||
if(vid.ended||vid.currentTime+0.2>vid.duration)
|
||||
show_video('swap');
|
||||
break;
|
||||
case 'swap':
|
||||
show_video('pause');
|
||||
if(current_video=='1')
|
||||
current_video = '2';
|
||||
else
|
||||
current_video = '1';
|
||||
show_video('play');
|
||||
show_video('load');
|
||||
break;
|
||||
case 'close':
|
||||
show_video('stop');
|
||||
vid.src = '';
|
||||
vid2.src = '';
|
||||
break;
|
||||
case 'length':
|
||||
return vid.duration;
|
||||
case 'currentTime':
|
||||
return vid.currentTime;
|
||||
case 'seek':
|
||||
// doesnt work currently
|
||||
//vid.currentTime = varVal;
|
||||
break;
|
||||
case 'setVisible':
|
||||
vid.style.visibility = varVal;
|
||||
break;
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
video_html = u"""
|
||||
<video id="video1" class="size" style="visibility:hidden" autobuffer preload>
|
||||
</video>
|
||||
<video id="video2" class="size" style="visibility:hidden" autobuffer preload>
|
||||
</video>
|
||||
"""
|
||||
|
||||
flash_css = u"""
|
||||
#flash {
|
||||
z-index:4;
|
||||
}
|
||||
"""
|
||||
|
||||
flash_js = u"""
|
||||
function getFlashMovieObject(movieName)
|
||||
{
|
||||
if (window.document[movieName])
|
||||
{
|
||||
return window.document[movieName];
|
||||
}
|
||||
if (document.embeds && document.embeds[movieName])
|
||||
return document.embeds[movieName];
|
||||
}
|
||||
|
||||
function show_flash(state, path, volume, varVal){
|
||||
var text = document.getElementById('flash');
|
||||
var flashMovie = getFlashMovieObject("OpenLPFlashMovie");
|
||||
var src = "src = 'file:///" + path + "'";
|
||||
var view_parm = " wmode='opaque'" +
|
||||
" width='100%%'" +
|
||||
" height='100%%'";
|
||||
var swf_parm = " name='OpenLPFlashMovie'" +
|
||||
" autostart='true' loop='false' play='true'" +
|
||||
" hidden='false' swliveconnect='true' allowscriptaccess='always'" +
|
||||
" volume='" + volume + "'";
|
||||
|
||||
switch(state){
|
||||
case 'load':
|
||||
text.innerHTML = "<embed " + src + view_parm + swf_parm + "/>";
|
||||
flashMovie = getFlashMovieObject("OpenLPFlashMovie");
|
||||
flashMovie.Play();
|
||||
break;
|
||||
case 'play':
|
||||
flashMovie.Play();
|
||||
break;
|
||||
case 'pause':
|
||||
flashMovie.StopPlay();
|
||||
break;
|
||||
case 'stop':
|
||||
flashMovie.StopPlay();
|
||||
tempHtml = text.innerHTML;
|
||||
text.innerHTML = '';
|
||||
text.innerHTML = tempHtml;
|
||||
break;
|
||||
case 'close':
|
||||
flashMovie.StopPlay();
|
||||
text.innerHTML = '';
|
||||
break;
|
||||
case 'length':
|
||||
return flashMovie.TotalFrames();
|
||||
case 'currentTime':
|
||||
return flashMovie.CurrentFrame();
|
||||
case 'seek':
|
||||
// flashMovie.GotoFrame(varVal);
|
||||
break;
|
||||
case 'setVisible':
|
||||
text.style.visibility = varVal;
|
||||
break;
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
flash_html = u"""
|
||||
<div id="flash" class="size" style="visibility:hidden"></div>
|
||||
"""
|
||||
|
||||
class WebkitAPI(MediaAPI):
|
||||
"""
|
||||
A specialised version of the MediaAPI class,
|
||||
@ -68,7 +248,8 @@ class WebkitAPI(MediaAPI):
|
||||
, u'*.mp4'
|
||||
, u'*.ogv'
|
||||
, u'*.webm'
|
||||
, u'*.swf', u'*.mpg', u'*.wmv', u'*.mpeg', u'*.avi'
|
||||
, u'*.mpg', u'*.wmv', u'*.mpeg', u'*.avi'
|
||||
, u'*.swf'
|
||||
]
|
||||
|
||||
def setup_controls(self, controller, control_panel):
|
||||
@ -79,190 +260,21 @@ class WebkitAPI(MediaAPI):
|
||||
"""
|
||||
Add css style sheets to htmlbuilder
|
||||
"""
|
||||
css = u'''
|
||||
#video1 {
|
||||
z-index:3;
|
||||
}
|
||||
#video2 {
|
||||
z-index:3;
|
||||
}
|
||||
#flash {
|
||||
z-index:4;
|
||||
}
|
||||
'''
|
||||
return css
|
||||
return video_css + flash_css
|
||||
|
||||
|
||||
def get_media_display_javascript(self):
|
||||
"""
|
||||
Add javascript functions to htmlbuilder
|
||||
"""
|
||||
js = u'''
|
||||
var video_timer = null;
|
||||
var current_video = '1';
|
||||
|
||||
function show_video(state, path, volume, loop, varVal){
|
||||
// Note, the preferred method for looping would be to use the
|
||||
// video tag loop attribute.
|
||||
// But QtWebKit doesn't support this. Neither does it support the
|
||||
// onended event, hence the setInterval()
|
||||
// In addition, setting the currentTime attribute to zero to restart
|
||||
// the video raises an INDEX_SIZE_ERROR: DOM Exception 1
|
||||
// To complicate it further, sometimes vid.currentTime stops
|
||||
// slightly short of vid.duration and vid.ended is intermittent!
|
||||
//
|
||||
// Note, currently the background may go black between loops. Not
|
||||
// desirable. Need to investigate using two <video>'s, and hiding/
|
||||
// preloading one, and toggle between the two when looping.
|
||||
|
||||
if(current_video=='1'){
|
||||
var vid = document.getElementById('video1');
|
||||
var vid2 = document.getElementById('video2');
|
||||
} else {
|
||||
var vid = document.getElementById('video2');
|
||||
var vid2 = document.getElementById('video1');
|
||||
}
|
||||
if(volume != null){
|
||||
vid.volume = volume;
|
||||
vid2.volume = volume;
|
||||
}
|
||||
switch(state){
|
||||
case 'init':
|
||||
vid.src = path;
|
||||
vid2.src = path;
|
||||
if(loop == null) loop = false;
|
||||
vid.looping = loop;
|
||||
vid2.looping = loop;
|
||||
vid.load();
|
||||
break;
|
||||
case 'load':
|
||||
vid2.style.visibility = 'hidden';
|
||||
vid2.load();
|
||||
break;
|
||||
case 'play':
|
||||
vid.play();
|
||||
//vid.style.visibility = 'visible';
|
||||
if(vid.looping){
|
||||
video_timer = setInterval(
|
||||
function() {
|
||||
show_video('poll');
|
||||
}, 200);
|
||||
}
|
||||
break;
|
||||
case 'pause':
|
||||
if(video_timer!=null){
|
||||
clearInterval(video_timer);
|
||||
video_timer = null;
|
||||
}
|
||||
vid.pause();
|
||||
break;
|
||||
case 'stop':
|
||||
show_video('pause');
|
||||
break;
|
||||
case 'poll':
|
||||
if(vid.ended||vid.currentTime+0.2>vid.duration)
|
||||
show_video('swap');
|
||||
break;
|
||||
case 'swap':
|
||||
show_video('pause');
|
||||
if(current_video=='1')
|
||||
current_video = '2';
|
||||
else
|
||||
current_video = '1';
|
||||
show_video('play');
|
||||
show_video('load');
|
||||
break;
|
||||
case 'close':
|
||||
show_video('stop');
|
||||
vid.src = '';
|
||||
vid2.src = '';
|
||||
break;
|
||||
case 'length':
|
||||
return vid.duration;
|
||||
case 'currentTime':
|
||||
return vid.currentTime;
|
||||
case 'seek':
|
||||
// doesnt work currently
|
||||
//vid.currentTime = varVal;
|
||||
break;
|
||||
case 'setVisible':
|
||||
vid.style.visibility = varVal;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function getFlashMovieObject(movieName)
|
||||
{
|
||||
if (window.document[movieName])
|
||||
{
|
||||
return window.document[movieName];
|
||||
}
|
||||
if (document.embeds && document.embeds[movieName])
|
||||
return document.embeds[movieName];
|
||||
}
|
||||
|
||||
function show_flash(state, path, volume, varVal){
|
||||
var text = document.getElementById('flash');
|
||||
var flashMovie = getFlashMovieObject("OpenLPFlashMovie");
|
||||
var src = "src = 'file:///" + path + "'";
|
||||
var view_parm = " wmode='opaque'" +
|
||||
" width='100%%'" +
|
||||
" height='100%%'";
|
||||
var swf_parm = " name='OpenLPFlashMovie'" +
|
||||
" autostart='true' loop='false' play='true'" +
|
||||
" hidden='false' swliveconnect='true' allowscriptaccess='always'" +
|
||||
" volume='" + volume + "'";
|
||||
|
||||
switch(state){
|
||||
case 'load':
|
||||
text.innerHTML = "<embed " + src + view_parm + swf_parm + "/>";
|
||||
flashMovie = getFlashMovieObject("OpenLPFlashMovie");
|
||||
flashMovie.Play();
|
||||
break;
|
||||
case 'play':
|
||||
flashMovie.Play();
|
||||
break;
|
||||
case 'pause':
|
||||
flashMovie.StopPlay();
|
||||
break;
|
||||
case 'stop':
|
||||
flashMovie.StopPlay();
|
||||
tempHtml = text.innerHTML;
|
||||
text.innerHTML = '';
|
||||
text.innerHTML = tempHtml;
|
||||
break;
|
||||
case 'close':
|
||||
flashMovie.StopPlay();
|
||||
text.innerHTML = '';
|
||||
break;
|
||||
case 'length':
|
||||
return flashMovie.TotalFrames();
|
||||
case 'currentTime':
|
||||
return flashMovie.CurrentFrame();
|
||||
case 'seek':
|
||||
// flashMovie.GotoFrame(varVal);
|
||||
break;
|
||||
case 'setVisible':
|
||||
text.style.visibility = varVal;
|
||||
break;
|
||||
}
|
||||
}
|
||||
'''
|
||||
return js
|
||||
return video_js + flash_js
|
||||
|
||||
|
||||
def get_media_display_html(self):
|
||||
"""
|
||||
Add html code to htmlbuilder
|
||||
"""
|
||||
html = u'''
|
||||
<video id="video1" class="size" style="visibility:hidden" autobuffer preload>
|
||||
</video>
|
||||
<video id="video2" class="size" style="visibility:hidden" autobuffer preload>
|
||||
</video>
|
||||
<div id="flash" class="size" style="visibility:hidden"></div>
|
||||
'''
|
||||
return html
|
||||
return video_html + flash_html
|
||||
|
||||
def setup(self, display):
|
||||
display.webView.resize(display.size())
|
||||
|
@ -85,7 +85,7 @@ class SlideController(Controller):
|
||||
self.ratio = float(self.screens.current[u'size'].width()) / \
|
||||
float(self.screens.current[u'size'].height())
|
||||
self.imageManager = self.parent().imageManager
|
||||
self.mediaManager = self.parent().mediaManager
|
||||
self.mediaController = self.parent().mediaController
|
||||
self.loopList = [
|
||||
u'Play Slides Menu',
|
||||
u'Loop Separator',
|
||||
@ -253,7 +253,7 @@ class SlideController(Controller):
|
||||
self.onEditSong)
|
||||
self.controllerLayout.addWidget(self.toolbar)
|
||||
# Build the Media Toolbar
|
||||
self.mediaManager.add_controller_items(self, self.controllerLayout)
|
||||
self.mediaController.add_controller_items(self, self.controllerLayout)
|
||||
if self.isLive:
|
||||
# Build the Song Toolbar
|
||||
self.songMenu = QtGui.QToolButton(self.toolbar)
|
||||
@ -390,7 +390,7 @@ class SlideController(Controller):
|
||||
|
||||
def liveEscape(self):
|
||||
self.display.setVisible(False)
|
||||
Receiver.send_message('Media Stop', [self])
|
||||
self.mediaController.video_stop([self])
|
||||
|
||||
def servicePrevious(self):
|
||||
time.sleep(0.1)
|
||||
@ -417,10 +417,10 @@ class SlideController(Controller):
|
||||
# The SlidePreview's ratio.
|
||||
self.ratio = float(self.screens.current[u'size'].width()) / \
|
||||
float(self.screens.current[u'size'].height())
|
||||
self.mediaManager.setup_display(self.display)
|
||||
self.mediaController.setup_display(self.display)
|
||||
self.previewSizeChanged()
|
||||
self.previewDisplay.setup()
|
||||
self.mediaManager.setup_display(self.previewDisplay)
|
||||
self.mediaController.setup_display(self.previewDisplay)
|
||||
if self.serviceItem:
|
||||
self.refreshServiceItem()
|
||||
|
||||
@ -519,7 +519,6 @@ class SlideController(Controller):
|
||||
# See bug #791050
|
||||
self.previousItem.setVisible(True)
|
||||
self.nextItem.setVisible(True)
|
||||
self.toolbar.show()
|
||||
self.toolbar.show()
|
||||
|
||||
def enablePreviewToolBar(self, item):
|
||||
@ -1148,8 +1147,8 @@ class SlideController(Controller):
|
||||
"""
|
||||
log.debug(u'SlideController onMediaStart')
|
||||
file = os.path.join(item.get_frame_path(), item.get_frame_title())
|
||||
self.mediaManager.video(self, file, False, False)
|
||||
if not self.isLive or self.mediaManager.withLivePreview:
|
||||
self.mediaController.video(self, file, False, False)
|
||||
if not self.isLive or self.mediaController.withLivePreview:
|
||||
self.previewDisplay.show()
|
||||
self.slidePreview.hide()
|
||||
|
||||
@ -1158,7 +1157,7 @@ class SlideController(Controller):
|
||||
Respond to a request to close the Video
|
||||
"""
|
||||
log.debug(u'SlideController onMediaClose')
|
||||
self.mediaManager.video_reset(self)
|
||||
self.mediaController.video_reset(self)
|
||||
self.previewDisplay.hide()
|
||||
self.slidePreview.show()
|
||||
|
||||
|
@ -56,14 +56,14 @@ class MediaMediaItem(MediaManagerItem):
|
||||
self.mediaObject = None
|
||||
self.mediaController = Controller(parent)
|
||||
self.mediaController.controllerLayout = QtGui.QVBoxLayout()
|
||||
self.plugin.mediaManager.add_controller_items(self.mediaController, \
|
||||
self.plugin.mediaController.add_controller_items(self.mediaController, \
|
||||
self.mediaController.controllerLayout)
|
||||
self.plugin.mediaManager.set_controls_visible(self.mediaController, \
|
||||
self.plugin.mediaController.set_controls_visible(self.mediaController, \
|
||||
False)
|
||||
self.mediaController.previewDisplay = Display(self.mediaController, \
|
||||
False, self.mediaController, self.plugin.pluginManager.plugins)
|
||||
self.mediaController.previewDisplay.setup()
|
||||
self.plugin.mediaManager.setup_display( \
|
||||
self.plugin.mediaController.setup_display( \
|
||||
self.mediaController.previewDisplay)
|
||||
self.mediaController.previewDisplay.hide()
|
||||
|
||||
@ -106,7 +106,7 @@ class MediaMediaItem(MediaManagerItem):
|
||||
"""
|
||||
Called to reset the Live background with the media selected,
|
||||
"""
|
||||
self.plugin.liveController.mediaManager.video_reset( \
|
||||
self.plugin.liveController.mediaController.video_reset( \
|
||||
self.plugin.liveController)
|
||||
self.resetAction.setVisible(False)
|
||||
|
||||
@ -126,7 +126,7 @@ class MediaMediaItem(MediaManagerItem):
|
||||
item = self.listView.currentItem()
|
||||
filename = unicode(item.data(QtCore.Qt.UserRole).toString())
|
||||
if os.path.exists(filename):
|
||||
if self.plugin.liveController.mediaManager.video( \
|
||||
if self.plugin.liveController.mediaController.video( \
|
||||
self.plugin.liveController, filename, True, True):
|
||||
self.resetAction.setVisible(True)
|
||||
else:
|
||||
@ -153,11 +153,11 @@ class MediaMediaItem(MediaManagerItem):
|
||||
'The file %s no longer exists.')) % filename)
|
||||
return False
|
||||
self.mediaLength = 0
|
||||
if self.plugin.mediaManager.video( \
|
||||
if self.plugin.mediaController.video( \
|
||||
self.mediaController, filename, False, False):
|
||||
self.mediaLength = self.mediaController.media_info.length
|
||||
service_item.media_length = self.mediaLength
|
||||
self.plugin.mediaManager.video_reset(self.mediaController)
|
||||
self.plugin.mediaController.video_reset(self.mediaController)
|
||||
if self.mediaLength > 0:
|
||||
service_item.add_capability(
|
||||
ItemCapabilities.AllowsVariableStartTime)
|
||||
|
@ -45,11 +45,11 @@ class MediaPlugin(Plugin):
|
||||
# passed with drag and drop messages
|
||||
self.dnd_id = u'Media'
|
||||
self.audio_extensions_list = \
|
||||
self.mediaManager.get_audio_extensions_list()
|
||||
self.mediaController.get_audio_extensions_list()
|
||||
for ext in self.audio_extensions_list:
|
||||
self.serviceManager.supportedSuffixes(ext[2:])
|
||||
self.video_extensions_list = \
|
||||
self.mediaManager.get_video_extensions_list()
|
||||
self.mediaController.get_video_extensions_list()
|
||||
for ext in self.video_extensions_list:
|
||||
self.serviceManager.supportedSuffixes(ext[2:])
|
||||
|
||||
@ -59,7 +59,7 @@ class MediaPlugin(Plugin):
|
||||
"""
|
||||
visible_name = self.getString(StringContent.VisibleName)
|
||||
return MediaTab(parent, self.name, visible_name[u'title'],
|
||||
self.mediaManager.APIs, self.icon_path)
|
||||
self.mediaController.APIs, self.icon_path)
|
||||
|
||||
def about(self):
|
||||
about_text = translate('MediaPlugin', '<strong>Media Plugin</strong>'
|
||||
@ -98,23 +98,23 @@ class MediaPlugin(Plugin):
|
||||
Time to tidy up on exit
|
||||
"""
|
||||
log.info(u'Media Finalising')
|
||||
self.mediaManager.finalise()
|
||||
self.mediaController.finalise()
|
||||
Plugin.finalise(self)
|
||||
|
||||
def getDisplayCss(self):
|
||||
"""
|
||||
Add css style sheets to htmlbuilder
|
||||
"""
|
||||
return self.mediaManager.get_media_display_css()
|
||||
return self.mediaController.get_media_display_css()
|
||||
|
||||
def getDisplayJavaScript(self):
|
||||
"""
|
||||
Add javascript functions to htmlbuilder
|
||||
"""
|
||||
return self.mediaManager.get_media_display_javascript()
|
||||
return self.mediaController.get_media_display_javascript()
|
||||
|
||||
def getDisplayHtml(self):
|
||||
"""
|
||||
Add html code to htmlbuilder
|
||||
"""
|
||||
return self.mediaManager.get_media_display_html()
|
||||
return self.mediaController.get_media_display_html()
|
||||
|
Loading…
Reference in New Issue
Block a user