Hi, I am using wx.media to play video files which are quite small and wondered if there was a way to resize the video to make it bigger?I am using the MediaCtrl.py from the Wxpython Demo. What would I need to add where to resize the video please?
Kind regards.
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
import wx
import wx.media
import os
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
try:
self.mc = wx.media.MediaCtrl(self, style=wx.SIMPLE_BORDER)
except NotImplementedError:
self.Destroy()
raise
sizer = wx.StaticBoxSizer(wx.StaticBox(self),wx.HORIZONTAL)
sizer.Add(self.mc, wx.SHAPED)
self.SetSizer(sizer)
wx.CallAfter(self.DoLoadFile, os.path.abspath("Video_683x384.mp4"))
self.mc.ShowPlayerControls()
def DoLoadFile(self, path):
if not self.mc.Load(path):
wx.MessageBox("Unable to load %s: Unsupported format?" % path,
"ERROR",
wx.ICON_ERROR | wx.OK)
else:
self.mc.SetInitialSize()
self.GetSizer().Layout()
app = wx.App()
frame = wx.Frame(None, -1, "TestPanel", size = (735, 473))
TestPanel(frame, -1)
frame.Show(1)
app.MainLoop()self.player = wx.media.MediaCtrl(self,-1,size=(588,448))