Package: gtk

Class gtk:video

Superclasses

Documented Subclasses

None

Direct Slots

autoplay
The autoplay property of type :boolean (Read / Write)
Whether the video should automatically begin playing.
Default value: false
file
The file property of type g:file (Read / Write)
The file played back by the video if the video is playing a file.
graphics-offload
The graphics-offload property of type gtk:graphics-offload-enabled (Read / Write)
Whether to enable graphics offload. Since 4.14
Default value: :disabled
loop
The loop property of type :boolean (Read / Write)
Whether new media files should be set to loop.
Default value: false
media-stream
The media-stream property of type gtk:media-stream (Read / Write)
The media stream played back.

Details

The gtk:video widget is a widget to show a gtk:media-stream object with media controls.

Figure: GtkVideo

The controls are available separately as the gtk:media-controls widget. If you just want to display a video without controls, you can treat it like any other paintable and, for example, put it into a gtk:picture widget.

The gtk:video widget aims to cover use cases such as previews, embedded animations, and so on. It supports autoplay, looping, and simple media controls. It does not have support for video overlays, multichannel audio, device selection, or input. If you are writing a full-fledged video player, you may want to use the gdk:paintable API and a media framework such as GStreamer directly.
 

Returned by

Slot Access Functions

Inherited Slot Access Functions

See also

2024-10-31