Bug #963955: Fix the video progress bar.

This commit is contained in:
Martin Zibricky 2012-10-27 19:04:54 +02:00
parent 4a68322a60
commit e6cc675207
2 changed files with 9 additions and 3 deletions

View File

@ -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)

View File

@ -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