video

class bgui.video.Video(parent, vid, name=None, play_audio=False, repeat=0, aspect=None, size=[1, 1], pos=[0, 0], sub_theme='', options=0)

Bases: bgui.image.Image

Widget for displaying video

Parameters:
  • parent – the widget’s parent
  • name – the name of the widget
  • vid – the video to use for the widget
  • play_audio – play the audio track of the video
  • repeat – how many times to repeat the video (-1 = infinite)
  • aspect – constrain the widget size to a specified aspect ratio
  • size – a tuple containing the width and height
  • pos – a tuple containing the x and y position
  • sub_theme – name of a sub_theme defined in the theme file (similar to CSS classes)
  • options – various other options
play(start, end, use_frames=True, fps=None)
on_finish

The widget’s on_finish callback