2010-11-07 21:36:17 -05:00
|
|
|
BoxLayout:
|
|
|
|
|
|
|
|
orientation: 'vertical'
|
2010-11-10 17:36:45 +01:00
|
|
|
spacing: 5
|
|
|
|
padding: 5
|
2010-11-07 21:36:17 -05:00
|
|
|
|
|
|
|
Video:
|
|
|
|
id: myvideo
|
2011-09-06 02:13:29 -05:00
|
|
|
source: '../widgets/softboy.avi'
|
2011-08-04 08:21:21 +02:00
|
|
|
allow_stretch: True
|
2011-09-06 02:13:29 -05:00
|
|
|
on_eos: self.play = True; print 'woot we are looping!'
|
2010-11-07 21:36:17 -05:00
|
|
|
|
|
|
|
BoxLayout:
|
|
|
|
size_hint_y: None
|
2010-11-10 17:36:45 +01:00
|
|
|
height: 30
|
2010-11-07 21:36:17 -05:00
|
|
|
|
2010-12-06 03:37:37 -05:00
|
|
|
Label:
|
|
|
|
id: mylabel
|
|
|
|
text: str(myvideo.position)
|
|
|
|
|
2010-11-10 17:36:45 +01:00
|
|
|
Slider:
|
|
|
|
value: myvideo.position
|
|
|
|
max: myvideo.duration
|
2011-08-04 08:21:21 +02:00
|
|
|
on_value: print args[1]
|
2010-11-07 21:36:17 -05:00
|
|
|
|
|
|
|
BoxLayout:
|
|
|
|
size_hint_y: None
|
|
|
|
height: 50
|
2010-11-10 17:36:45 +01:00
|
|
|
spacing: 5
|
2010-11-07 21:36:17 -05:00
|
|
|
|
|
|
|
ToggleButton:
|
|
|
|
group: 'video'
|
|
|
|
text: 'Play'
|
2011-08-04 08:21:21 +02:00
|
|
|
state: 'down' if myvideo.play else 'normal'
|
2010-11-07 21:36:17 -05:00
|
|
|
on_press: myvideo.play = True
|
|
|
|
|
|
|
|
ToggleButton:
|
|
|
|
group: 'video'
|
|
|
|
text: 'Stop'
|
2011-08-04 08:21:21 +02:00
|
|
|
state: 'down' if not myvideo.play else 'normal'
|
2010-11-07 21:36:17 -05:00
|
|
|
on_press: myvideo.play = False
|
|
|
|
|