Commits

Michele Orrù  committed c856ecb

Fixing

  • Participants
  • Parent commits 2f3e2b4

Comments (0)

Files changed (1)

File player-example.py

         """
         if self.player:
             self.player.stop()
+            # reset the time slider
+            self.timeslider.SetValue(0)
             self.timer.Stop()
 
+
     def OnTimer(self, evt):
         """
         Update the time slider according to the current movie time.
         is_mute = self.player.audio_get_mute()
 
         self.player.audio_set_mute(not is_mute)
-        # update the volume slider
-        if is_mute:
-            self.volslider.SetValue(0)
-        else:
-            # since vlc volume range is in [0, 200],
-            # and our volume slider has range [0, 100], just divide by 2.
-            self.volslider.SetValue(self.player.audio_get_volume() // 2)
+        # update the volume slider;
+        # since vlc volume range is in [0, 200],
+        # and our volume slider has range [0, 100], just divide by 2.
+        self.volslider.SetValue(self.player.audio_get_volume() // 2)
 
 
     def OnSetVolume(self, evt):