gtk.video
Module for [Video] class
Types 3
gtk.video.Video is a widget to show a gtk.media_stream.MediaStream with media controls.
The controls are available separately as gtk.media_controls.MediaControls. 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.Picture.
gtk.video.Video aims to cover use cases such as previews, embedded animations, etc. 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.Paintable API and a media framework such as Gstreamer directly.
VideoGidBuilder builder() static nothrowGet builder for [gtk.video.Video] Returns: New builder objectbool autoplay() @property nothrowGet `autoplay` property. Returns: If the video should automatically begin playing.void autoplay(bool propval) @property nothrowSet `autoplay` property. Params: propval = If the video should automatically begin playing.gio.file.File file() @property nothrowGet `file` property. Returns: The file played by this video if the video is playing a file.void file(gio.file.File propval) @property nothrowSet `file` property. Params: propval = The file played by this video if the video is playing a file.gtk.types.GraphicsOffloadEnabled graphicsOffload() @property nothrowGet `graphicsOffload` property. Returns: Whether to enable graphics offload.void graphicsOffload(gtk.types.GraphicsOffloadEnabled propval) @property nothrowSet `graphicsOffload` property. Params: propval = Whether to enable graphics offload.bool loop() @property nothrowGet `loop` property. Returns: If new media files should be set to loop.void loop(bool propval) @property nothrowSet `loop` property. Params: propval = If new media files should be set to loop.gtk.media_stream.MediaStream mediaStream() @property nothrowGet `mediaStream` property. Returns: The media-stream playedvoid mediaStream(gtk.media_stream.MediaStream propval) @property nothrowSet `mediaStream` property. Params: propval = The media-stream playedgtk.video.Video newForFile(gio.file.File file = null) static nothrowCreates a [gtk.video.Video] to play back the given file.gtk.video.Video newForFilename(string filename = null) static nothrowCreates a [gtk.video.Video] to play back the given filename.gtk.video.Video newForMediaStream(gtk.media_stream.MediaStream stream = null) static nothrowCreates a [gtk.video.Video] to play back the given stream.gtk.video.Video newForResource(string resourcePath = null) static nothrowCreates a [gtk.video.Video] to play back the resource at the given resource_path.bool getAutoplay() nothrowReturns true if videos have been set to loop. Returns: true if streams should autoplaygio.file.File getFile() nothrowGets the file played by self or null if not playing back a file. Returns: The file played by selfgtk.types.GraphicsOffloadEnabled getGraphicsOffload() nothrowReturns whether graphics offload is enabled.bool getLoop() nothrowReturns true if videos have been set to loop. Returns: true if streams should loopgtk.media_stream.MediaStream getMediaStream() nothrowGets the media stream managed by self or null if none. Returns: The media stream managed by selfvoid setAutoplay(bool autoplay) nothrowSets whether self automatically starts playback when it becomes visible or when a new file gets loaded.void setGraphicsOffload(gtk.types.GraphicsOffloadEnabled enabled) nothrowSets whether to enable graphics offload.void setMediaStream(gtk.media_stream.MediaStream stream = null) nothrowSets the media stream to be played back.void setResource(string resourcePath = null) nothrowMakes self play the resource at the given resource_path.Fluent builder implementation template for gtk.video.Video
T autoplay(bool propval) nothrowSet `autoplay` property. Params: propval = If the video should automatically begin playing. Returns: Builder instance for fluent chainingT file(gio.file.File propval) nothrowSet `file` property. Params: propval = The file played by this video if the video is playing a file. Returns: Builder instance for fluent chainingT graphicsOffload(gtk.types.GraphicsOffloadEnabled propval) nothrowSet `graphicsOffload` property. Params: propval = Whether to enable graphics offload. Returns: Builder instance for fluent chainingT loop(bool propval) nothrowSet `loop` property. Params: propval = If new media files should be set to loop. Returns: Builder instance for fluent chainingT mediaStream(gtk.media_stream.MediaStream propval) nothrowSet `mediaStream` property. Params: propval = The media-stream played Returns: Builder instance for fluent chainingFluent builder for gtk.video.Video