kivy/examples/kv/app_video.kv

46 lines
692 B
Plaintext

BoxLayout:
orientation: 'vertical'
spacing: 5
padding: 5
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
BoxLayout:
size_hint_y: None
height: 30
Label:
id: mylabel
text: str(myvideo.position)
Slider:
value: myvideo.position
max: myvideo.duration
on_value: print arg[0]
BoxLayout:
size_hint_y: None
height: 50
spacing: 5
ToggleButton:
group: 'video'
text: 'Play'
on_press: myvideo.play = True
ToggleButton:
group: 'video'
text: 'Stop'
on_press: myvideo.play = False