Documentation
¶
Overview ¶
A control used for playback of graphics.gd/classdb/VideoStream resources.
Supported video formats are Ogg Theora (.ogv, graphics.gd/classdb/VideoStreamTheora) and any format exposed via a GDExtension plugin.
Warning: On Web, video playback will perform poorly due to missing architecture-specific assembly optimizations.
Index ¶
- type Advanced
- type Any
- type Extension
- type ID
- type Instance
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsControl() Control.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsVideoStreamPlayer() Instance
- func (self Instance) AudioTrack() int
- func (self Instance) Autoplay() bool
- func (self Instance) BufferingMsec() int
- func (self Instance) Bus() string
- func (self Instance) Expand() bool
- func (self Instance) GetStreamLength() Float.X
- func (self Instance) GetStreamName() string
- func (self Instance) GetVideoTexture() Texture2D.Instance
- func (self Instance) ID() ID
- func (self Instance) IsPlaying() bool
- func (self Instance) Loop() bool
- func (self Instance) OnFinished(cb func(), flags ...Signal.Flags)
- func (self Instance) Paused() bool
- func (self Instance) Play()
- func (self Instance) SetAudioTrack(value int)
- func (self Instance) SetAutoplay(value bool)
- func (self Instance) SetBufferingMsec(value int)
- func (self Instance) SetBus(value string)
- func (self Instance) SetExpand(value bool)
- func (self Instance) SetLoop(value bool)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetPaused(value bool)
- func (self Instance) SetSpeedScale(value Float.X)
- func (self Instance) SetStream(value VideoStream.Instance)
- func (self Instance) SetStreamPosition(value Float.X)
- func (self Instance) SetVolume(value Float.X)
- func (self Instance) SetVolumeDb(value Float.X)
- func (self Instance) SpeedScale() Float.X
- func (self Instance) Stop()
- func (self Instance) Stream() VideoStream.Instance
- func (self Instance) StreamPosition() Float.X
- func (self Instance) Virtual(name string) reflect.Value
- func (self Instance) Volume() Float.X
- func (self Instance) VolumeDb() Float.X
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsCanvasItem ¶
func (self *Extension[T]) AsCanvasItem() CanvasItem.Instance
func (*Extension[T]) AsVideoStreamPlayer ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.VideoStreamPlayer
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) AsVideoStreamPlayer ¶
func (Instance) AudioTrack ¶
func (Instance) BufferingMsec ¶
func (Instance) GetStreamLength ¶
The length of the current stream, in seconds.
func (Instance) GetStreamName ¶
Returns the video stream's name, or "<No Stream>" if no video stream is assigned.
func (Instance) GetVideoTexture ¶
Returns the current frame as a graphics.gd/classdb/Texture2D.
func (Instance) IsPlaying ¶
Returns true if the video is playing.
Note: The video is still considered playing if paused during playback.
func (Instance) OnFinished ¶
func (Instance) Play ¶
func (self Instance) Play()
Starts the video playback from the beginning. If the video is paused, this will not unpause the video.
func (Instance) SetAudioTrack ¶
func (Instance) SetAutoplay ¶
func (Instance) SetBufferingMsec ¶
func (Instance) SetSpeedScale ¶
func (Instance) SetStream ¶
func (self Instance) SetStream(value VideoStream.Instance)
func (Instance) SetStreamPosition ¶
func (Instance) SetVolumeDb ¶
func (Instance) SpeedScale ¶
func (Instance) Stop ¶
func (self Instance) Stop()
Stops the video playback and sets the stream position to 0.
Note: Although the stream position will be set to 0, the first frame of the video stream won't become the current frame.
func (Instance) Stream ¶
func (self Instance) Stream() VideoStream.Instance