examples: add a very short example with scatter + video, and include trailer of big buck bunny. (sorry about that 3mo file, but that's the smallest and open source interesting video i've known ^^)

This commit is contained in:
Mathieu Virbel 2011-03-29 18:23:12 +02:00
parent 5eaaf98a43
commit e63a5f047b
2 changed files with 23 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,23 @@
import kivy
kivy.require('1.0.4')
from os.path import dirname, join
from kivy.app import App
from kivy.uix.video import Video
from kivy.uix.scatter import Scatter
class VideoPlayer(App):
def build(self):
curdir = dirname(__file__)
filename = join(curdir, 'bigbuckbunny_trailer.m4v')
video = Video(source=filename, play=True)
scatter = Scatter()
video.bind(texture_size=scatter.setter('size'))
scatter.add_widget(video)
return scatter
if __name__ in ('__main__', '__android__'):
VideoPlayer().run()