python - wx MediaCtrl Mac OS X backend does not mantain aspect ratio -
on mac os x backend found doesn't keep aspect ratio when window resized? there way that?
note: code doesn't seem work urls... strange works files... (with load changed loaduri still doesn't work)
test code
import wx import wx.media class mypanel(wx.panel): def __init__(self, parent, id, f): wx.panel.__init__(self, parent, id, size = (500, 500)) sizer = wx.boxsizer(wx.horizontal) self.mc = wx.media.mediactrl(self, -1) sizer.add(self.mc, border = 3, flag = wx.all | wx.expand, proportion = 1) self.bind(wx.media.evt_media_loaded, self.onmedialoaded, self.mc) self.setsizer(sizer) wx.calllater(10000, self.test, f) def test(self, url): print "loading" r = self.mc.load(url) if not r: print "failed load" def onmedialoaded(self, event): wx.calllater(3000, self.mc.play) print "playing..." if __name__ == "__main__": fn = raw_input("file load: ") app = wx.app(false) f = wx.frame(none, -1) p = mypanel(f, -1, fn) f.show() app.mainloop()
Comments
Post a Comment