import pyglet
import time
win = pyglet.window.Window()
win.switch_to()
player = pyglet.media.Player()
source = pyglet.media.load('data/demo.mpg')
player.queue(source)
player.play()
@win.event
def on_draw():
win.clear()
if source and source.video_format:
player.get_texture().blit(100,200)
startT = time.time()
while time.time() - startT < source.duration:
win.dispatch_events()
time.sleep(0.01)
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.