forked from openlp/openlp
Bug #963955: Fix the video progress bar.
This commit is contained in:
parent
4a68322a60
commit
e6cc675207
@ -144,13 +144,18 @@ class MediaController(object):
|
||||
if not self.curDisplayMediaPlayer.keys():
|
||||
self.timer.stop()
|
||||
else:
|
||||
any_active = False
|
||||
for display in self.curDisplayMediaPlayer.keys():
|
||||
self.curDisplayMediaPlayer[display].resize(display)
|
||||
self.curDisplayMediaPlayer[display].update_ui(display)
|
||||
if self.curDisplayMediaPlayer[display].state == \
|
||||
MediaState.Playing:
|
||||
return
|
||||
# no players are active anymore
|
||||
MediaState.Playing:
|
||||
any_active = True
|
||||
# There are still any active players - no need to stop timer.
|
||||
if any_active:
|
||||
return
|
||||
|
||||
# No players are active anymore.
|
||||
for display in self.curDisplayMediaPlayer.keys():
|
||||
if self.curDisplayMediaPlayer[display].state != MediaState.Paused:
|
||||
display.controller.seekSlider.setSliderPosition(0)
|
||||
|
@ -230,6 +230,7 @@ class VlcPlayer(MediaPlayer):
|
||||
display.vlcWidget.setVisible(status)
|
||||
|
||||
def update_ui(self, display):
|
||||
# Stop video if playback is finished.
|
||||
if display.vlcMedia.get_state() == vlc.State.Ended:
|
||||
self.stop(display)
|
||||
controller = display.controller
|
||||
|
Loading…
Reference in New Issue
Block a user