kivy/examples/kv/app_video.kv

46 lines
711 B
Plaintext

BoxLayout:
orientation: 'vertical'
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
size: label.texture_size
Label:
id: label
text: str(myvideo.position)
canvas:
Color:
rgb: (1, 1, 1)
Rectangle:
texture: self.texture
pos: self.pos
size: self.texture_size
BoxLayout:
size_hint_y: None
height: 50
ToggleButton:
group: 'video'
text: 'Play'
on_press: myvideo.play = True
ToggleButton:
group: 'video'
text: 'Stop'
on_press: myvideo.play = False