code: def create_video(self):
          
  
          self.instance = vlc.Instance()
  
          video_widget = QFrame()
          self.mediaplayer = self.instance.media_player_new()
          if system() == 'Linux':
              self.mediaplayer.set_xwindow(video_widget.winId())
          elif system() == 'Windows':
              self.mediaplayer.set_hwnd(video_widget.winId())
          elif system() == 'darwin':  # to test
              self.mediaplayer.set_nsobject(video_widget.winId())
          else:
              lg.warning('unsupported system for video widget')
              return
  
          self.medialistplayer = vlc.MediaListPlayer()
          self.medialistplayer.set_media_player(self.mediaplayer)
          event_manager = self.medialistplayer.event_manager()
          event_manager.event_attach(vlc.EventType.MediaListPlayerNextItemSet,
                                     self.next_video)
  
          self.idx_button = QPushButton()
          self.idx_button.setText('Start')
          self.idx_button.clicked.connect(self.start_stop_video)
  
          layout = QVBoxLayout()
          layout.addWidget(video_widget)
          layout.addWidget(self.idx_button)
          self.setLayout(layout)
docs: Create video widget.