forked from openlp/openlp
some media renames
This commit is contained in:
parent
1d9425c3b7
commit
e1f35e002a
@ -319,11 +319,11 @@ class MediaController(object):
|
||||
self.finalise()
|
||||
# update player status
|
||||
self._set_active_players()
|
||||
display.hasAudio = True
|
||||
display.has_audio = True
|
||||
if display.is_live and preview:
|
||||
return
|
||||
if preview:
|
||||
display.hasAudio = False
|
||||
display.has_audio = False
|
||||
for player in self.media_players.values():
|
||||
if player.isActive:
|
||||
player.setup(display)
|
||||
@ -474,7 +474,7 @@ class MediaController(object):
|
||||
player = self.media_players[title]
|
||||
if suffix in player.video_extensions_list:
|
||||
if not controller.media_info.is_background or controller.media_info.is_background and \
|
||||
player.canBackground:
|
||||
player.can_background:
|
||||
self.resize(display, player)
|
||||
if player.load(display):
|
||||
self.current_media_players[controller.controller_type] = player
|
||||
|
@ -47,10 +47,10 @@ class MediaPlayer(object):
|
||||
self.name = name
|
||||
self.available = self.check_available()
|
||||
self.isActive = False
|
||||
self.canBackground = False
|
||||
self.can_background = False
|
||||
self.canFolder = False
|
||||
self.state = MediaState.Off
|
||||
self.hasOwnWidget = False
|
||||
self.has_own_widget = False
|
||||
self.audio_extensions_list = []
|
||||
self.video_extensions_list = []
|
||||
|
||||
|
@ -126,16 +126,16 @@ class PhononPlayer(MediaPlayer):
|
||||
"""
|
||||
Set up the player widgets
|
||||
"""
|
||||
display.phononWidget = Phonon.VideoWidget(display)
|
||||
display.phononWidget.resize(display.size())
|
||||
display.phonon_widget = Phonon.VideoWidget(display)
|
||||
display.phonon_widget.resize(display.size())
|
||||
display.media_object = Phonon.MediaObject(display)
|
||||
Phonon.createPath(display.media_object, display.phononWidget)
|
||||
if display.hasAudio:
|
||||
Phonon.createPath(display.media_object, display.phonon_widget)
|
||||
if display.has_audio:
|
||||
display.audio = Phonon.AudioOutput(Phonon.VideoCategory, display.media_object)
|
||||
Phonon.createPath(display.media_object, display.audio)
|
||||
display.phononWidget.raise_()
|
||||
display.phononWidget.hide()
|
||||
self.hasOwnWidget = True
|
||||
display.phonon_widget.raise_()
|
||||
display.phonon_widget.hide()
|
||||
self.has_own_widget = True
|
||||
|
||||
def check_available(self):
|
||||
"""
|
||||
@ -177,7 +177,7 @@ class PhononPlayer(MediaPlayer):
|
||||
"""
|
||||
Resize the display
|
||||
"""
|
||||
display.phononWidget.resize(display.size())
|
||||
display.phonon_widget.resize(display.size())
|
||||
|
||||
def play(self, display):
|
||||
"""
|
||||
@ -197,7 +197,7 @@ class PhononPlayer(MediaPlayer):
|
||||
controller.media_info.length = int(display.media_object.totalTime() / 1000)
|
||||
controller.seekSlider.setMaximum(controller.media_info.length * 1000)
|
||||
self.state = MediaState.Playing
|
||||
display.phononWidget.raise_()
|
||||
display.phonon_widget.raise_()
|
||||
return True
|
||||
|
||||
def pause(self, display):
|
||||
@ -221,7 +221,7 @@ class PhononPlayer(MediaPlayer):
|
||||
Set the volume
|
||||
"""
|
||||
# 1.0 is the highest value
|
||||
if display.hasAudio:
|
||||
if display.has_audio:
|
||||
vol = float(vol) / float(100)
|
||||
display.audio.setVolume(vol)
|
||||
|
||||
@ -238,15 +238,15 @@ class PhononPlayer(MediaPlayer):
|
||||
display.media_object.stop()
|
||||
display.media_object.clearQueue()
|
||||
self.set_visible(display, False)
|
||||
display.phononWidget.setVisible(False)
|
||||
display.phonon_widget.setVisible(False)
|
||||
self.state = MediaState.Off
|
||||
|
||||
def set_visible(self, display, status):
|
||||
"""
|
||||
Set the visibility of the widget
|
||||
"""
|
||||
if self.hasOwnWidget:
|
||||
display.phononWidget.setVisible(status)
|
||||
if self.has_own_widget:
|
||||
display.phonon_widget.setVisible(status)
|
||||
|
||||
def update_ui(self, display):
|
||||
"""
|
||||
|
@ -120,7 +120,7 @@ class VlcPlayer(MediaPlayer):
|
||||
display.vlcWidget.setFrameStyle(QtGui.QFrame.NoFrame)
|
||||
# creating a basic vlc instance
|
||||
command_line_options = u'--no-video-title-show'
|
||||
if not display.hasAudio:
|
||||
if not display.has_audio:
|
||||
command_line_options += u' --no-audio --no-video-title-show'
|
||||
if Settings().value(u'advanced/hide mouse') and display.controller.is_live:
|
||||
command_line_options += u' --mouse-hide-timeout=0'
|
||||
@ -145,7 +145,7 @@ class VlcPlayer(MediaPlayer):
|
||||
else:
|
||||
# for Linux using the X Server
|
||||
display.vlcMediaPlayer.set_xwindow(win_id)
|
||||
self.hasOwnWidget = True
|
||||
self.has_own_widget = True
|
||||
|
||||
def check_available(self):
|
||||
"""
|
||||
@ -238,7 +238,7 @@ class VlcPlayer(MediaPlayer):
|
||||
"""
|
||||
Set the volume
|
||||
"""
|
||||
if display.hasAudio:
|
||||
if display.has_audio:
|
||||
display.vlcMediaPlayer.audio_set_volume(vol)
|
||||
|
||||
def seek(self, display, seekVal):
|
||||
@ -260,7 +260,7 @@ class VlcPlayer(MediaPlayer):
|
||||
"""
|
||||
Set the visibility
|
||||
"""
|
||||
if self.hasOwnWidget:
|
||||
if self.has_own_widget:
|
||||
display.vlcWidget.setVisible(status)
|
||||
|
||||
def update_ui(self, display):
|
||||
|
@ -279,7 +279,7 @@ class WebkitPlayer(MediaPlayer):
|
||||
self.original_name = u'WebKit'
|
||||
self.display_name = u'&WebKit'
|
||||
self.parent = parent
|
||||
self.canBackground = True
|
||||
self.can_background = True
|
||||
self.audio_extensions_list = AUDIO_EXT
|
||||
self.video_extensions_list = VIDEO_EXT
|
||||
|
||||
@ -309,7 +309,7 @@ class WebkitPlayer(MediaPlayer):
|
||||
"""
|
||||
display.web_view.resize(display.size())
|
||||
display.web_view.raise_()
|
||||
self.hasOwnWidget = False
|
||||
self.has_own_widget = False
|
||||
|
||||
def check_available(self):
|
||||
"""
|
||||
@ -323,7 +323,7 @@ class WebkitPlayer(MediaPlayer):
|
||||
"""
|
||||
log.debug(u'load vid in Webkit Controller')
|
||||
controller = display.controller
|
||||
if display.hasAudio and not controller.media_info.is_background:
|
||||
if display.has_audio and not controller.media_info.is_background:
|
||||
volume = controller.media_info.volume
|
||||
vol = float(volume) / float(100)
|
||||
else:
|
||||
@ -399,7 +399,7 @@ class WebkitPlayer(MediaPlayer):
|
||||
"""
|
||||
controller = display.controller
|
||||
# 1.0 is the highest value
|
||||
if display.hasAudio:
|
||||
if display.has_audio:
|
||||
vol = float(vol) / float(100)
|
||||
if not controller.media_info.is_flash:
|
||||
display.frame.evaluateJavaScript(u'show_video(null, null, %s);' % str(vol))
|
||||
|
Loading…
Reference in New Issue
Block a user