def OnTogglePlay ( self , event ) : if self . player . get_state ( ) == vlc . State . Playing : self . player . pause ( ) else : self . player . play ( ) event . Skip ( )
python vlc media player detect finished playing
Toggles the video status between play and hold
def OnTogglePlay(self, event):
        """Toggles the video status between play and hold"""

        if self.player.get_state() == vlc.State.Playing:
            self.player.pause()
        else:
            self.player.play()

        event.Skip()