diff --git a/examples/kv/app_video.kv b/examples/kv/app_video.kv index 3f7c96240..9f75a0236 100644 --- a/examples/kv/app_video.kv +++ b/examples/kv/app_video.kv @@ -7,13 +7,8 @@ BoxLayout: Video: id: myvideo source: '/home/tito/code/pymt/examples/apps/videoplayer/softboy.avi' - canvas: - Color: - rgb: (1, 1, 1) - Rectangle: - pos: self.pos - texture: self.texture - size: self.size + allow_stretch: True + on_eos: self.play = True; print 'woot we ar elooping!' BoxLayout: size_hint_y: None @@ -26,7 +21,7 @@ BoxLayout: Slider: value: myvideo.position max: myvideo.duration - on_value: print args[0] + on_value: print args[1] BoxLayout: size_hint_y: None @@ -36,10 +31,12 @@ BoxLayout: ToggleButton: group: 'video' text: 'Play' + state: 'down' if myvideo.play else 'normal' on_press: myvideo.play = True ToggleButton: group: 'video' text: 'Stop' + state: 'down' if not myvideo.play else 'normal' on_press: myvideo.play = False diff --git a/kivy/uix/video.py b/kivy/uix/video.py index 46f9ed8af..27bd8f245 100644 --- a/kivy/uix/video.py +++ b/kivy/uix/video.py @@ -127,6 +127,7 @@ class Video(Image): self._video.stop() self._video.position = 0. self._video.eos = False + self.eos = False self._video.play() else: self._video.stop() @@ -138,6 +139,7 @@ class Video(Image): self.canvas.ask_update() def _on_eos(self, *largs): + self.play = False self.eos = True def on_volume(self, instance, value):