dabo Commit
Revision 6909
Date: 2011-10-22 09:35:19 -0700 (Sat, 22 Oct 2011)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6909
Changed:
U trunk/dabo/ui/uiwx/dMediaControl.py
Log:
Corrected example code to make it properly working on Windows platform.
Diff:
Modified: trunk/dabo/ui/uiwx/dMediaControl.py
===================================================================
--- trunk/dabo/ui/uiwx/dMediaControl.py 2011-10-20 23:44:15 UTC (rev 6908)
+++ trunk/dabo/ui/uiwx/dMediaControl.py 2011-10-22 16:35:19 UTC (rev 6909)
@@ -353,7 +353,12 @@
# your machine, or another URI.
#uri = "/Users/ed/Downloads/roc.mov"
uri =
"http://c0097282.cdn.cloudfiles.rackspacecloud.com/how_to_fold_a_shirt.mpg"
- self.player = dMediaControl(self, Source=uri,
Loop=False)
+ if self.Application.Platform == "Win":
+ backend = wx.media.MEDIABACKEND_WMP10
+ else:
+ backend = ""
+ self.player = dMediaControl(self, Source=uri,
Loop=False, OnMediaLoaded=self.onMediaLoaded,
+ szBackend=backend)
# Change this to fill the form
show_native_size = True
if show_native_size:
@@ -361,6 +366,9 @@
else:
self.Sizer.append1x(self.player)
+ def onMediaLoaded(self, evt):
+ print "MediaLoaded"
+
app = dabo.dApp(MainFormClass=MediaForm)
app.start()
\ No newline at end of file
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]