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():
|
if not self.curDisplayMediaPlayer.keys():
|
||||||
self.timer.stop()
|
self.timer.stop()
|
||||||
else:
|
else:
|
||||||
|
any_active = False
|
||||||
for display in self.curDisplayMediaPlayer.keys():
|
for display in self.curDisplayMediaPlayer.keys():
|
||||||
self.curDisplayMediaPlayer[display].resize(display)
|
self.curDisplayMediaPlayer[display].resize(display)
|
||||||
self.curDisplayMediaPlayer[display].update_ui(display)
|
self.curDisplayMediaPlayer[display].update_ui(display)
|
||||||
if self.curDisplayMediaPlayer[display].state == \
|
if self.curDisplayMediaPlayer[display].state == \
|
||||||
MediaState.Playing:
|
MediaState.Playing:
|
||||||
|
any_active = True
|
||||||
|
# There are still any active players - no need to stop timer.
|
||||||
|
if any_active:
|
||||||
return
|
return
|
||||||
# no players are active anymore
|
|
||||||
|
# No players are active anymore.
|
||||||
for display in self.curDisplayMediaPlayer.keys():
|
for display in self.curDisplayMediaPlayer.keys():
|
||||||
if self.curDisplayMediaPlayer[display].state != MediaState.Paused:
|
if self.curDisplayMediaPlayer[display].state != MediaState.Paused:
|
||||||
display.controller.seekSlider.setSliderPosition(0)
|
display.controller.seekSlider.setSliderPosition(0)
|
||||||
|
@ -230,6 +230,7 @@ class VlcPlayer(MediaPlayer):
|
|||||||
display.vlcWidget.setVisible(status)
|
display.vlcWidget.setVisible(status)
|
||||||
|
|
||||||
def update_ui(self, display):
|
def update_ui(self, display):
|
||||||
|
# Stop video if playback is finished.
|
||||||
if display.vlcMedia.get_state() == vlc.State.Ended:
|
if display.vlcMedia.get_state() == vlc.State.Ended:
|
||||||
self.stop(display)
|
self.stop(display)
|
||||||
controller = display.controller
|
controller = display.controller
|
||||||
|
Loading…
Reference in New Issue
Block a user