Package org.gnome.gtk
Class MediaStream.Builder<B extends MediaStream.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gtk.MediaStream.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Direct Known Subclasses:
MediaFile.Builder
- Enclosing class:
MediaStream
public static class MediaStream.Builder<B extends MediaStream.Builder<B>>
extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theMediaStream
object.setLoop
(boolean loop) Try to restart the media from the beginning once it ended.setMuted
(boolean muted) Whether the audio stream should be muted.setPlaying
(boolean playing) Whether the stream is currently playing.setPrepared
(boolean prepared) Whether the stream has finished initializing and existence of audio and video is known.setVolume
(double volume) Volume of the audio stream.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theMediaStream
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toMediaStream
.- Overrides:
build
in classGObject.Builder<B extends MediaStream.Builder<B>>
- Returns:
- a new instance of
MediaStream
with the properties that were set in the Builder object.
-
setLoop
Try to restart the media from the beginning once it ended.- Parameters:
loop
- the value for theloop
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setMuted
Whether the audio stream should be muted.- Parameters:
muted
- the value for themuted
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPlaying
Whether the stream is currently playing.- Parameters:
playing
- the value for theplaying
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPrepared
Whether the stream has finished initializing and existence of audio and video is known.- Parameters:
prepared
- the value for theprepared
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setVolume
Volume of the audio stream.- Parameters:
volume
- the value for thevolume
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-