Python WX.MediaCtrl Black Transition Between Videos

Solution for Python WX.MediaCtrl Black Transition Between Videos
is Given Below:

I am writing a wx.Python code that plays a video on a button press (works). If another button is pressed then another video is played (works).

However, there is a 2(ish) seconds of black screen while the second video is loaded. Is there a way to have it immediately load and play instead of having the black screen transition?

        def onTestClick(self, media):
    #array = 2

    #if already playing, button press, next vid becomes 0, preload next vid, delay 1.6sec, play.
    self.vidqueue = ["", ""]
    self.vidqueue [0] = "Null"
    self.vidqueue [1] = media

    if self.vidqueue[0] == "Null":
        self.vidqueue [0] = self.vidqueue [1]
        print (self.vidqueue[0])
    self.testMedia =, size = (500, 300), style=wx.SIMPLE_BORDER, szBackend =
    self.testMedia.Load(self.vidqueue [0])
    self.testMedia.Bind(, self.quit)

    self.Bind(wx.EVT_BUTTON, self.addVid1, addBtn1)
    self.Bind(wx.EVT_BUTTON, self.addVid2, addBtn2)

def buttonPressed1(self, event):
    file1 = filePathList[0]
def buttonPressed2(self, event):
    file2 = filePathList[1]

def play(self, event):
    self.vidqueue [0] = "Null"

def quit(self, event):