Documentation
¶
Overview ¶
Package VideoStreamPlayer provides methods for working with VideoStreamPlayer object instances.
Index ¶
- type Advanced
- type Any
- 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() [1]gdclass.Texture2D
- func (self Instance) IsPlaying() bool
- func (self Instance) Loop() bool
- func (self Instance) OnFinished(cb func())
- 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) SetPaused(value bool)
- func (self Instance) SetStream(value [1]gdclass.VideoStream)
- func (self Instance) SetStreamPosition(value Float.X)
- func (self Instance) SetVolume(value Float.X)
- func (self Instance) SetVolumeDb(value Float.X)
- func (self Instance) Stop()
- func (self Instance) Stream() [1]gdclass.VideoStream
- func (self Instance) StreamPosition() Float.X
- func (self *Instance) UnsafePointer() unsafe.Pointer
- 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 Instance ¶
type Instance [1]gdclass.VideoStreamPlayer
A control used for playback of [VideoStream] resources. Supported video formats are [url=https://www.theora.org/]Ogg Theora[/url] ([code].ogv[/code], [VideoStreamTheora]) and any format exposed via a GDExtension plugin. [b]Warning:[/b] On Web, video playback [i]will[/i] perform poorly due to missing architecture-specific assembly optimizations.
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. [b]Note:[/b] For [VideoStreamTheora] streams (the built-in format supported by Godot), this value will always be zero, as getting the stream length is not implemented yet. The feature may be supported by video formats implemented by a GDExtension add-on.
func (Instance) GetStreamName ¶
Returns the video stream's name, or [code]"<No Stream>"[/code] if no video stream is assigned.
func (Instance) GetVideoTexture ¶
Returns the current frame as a [Texture2D].
func (Instance) IsPlaying ¶
Returns [code]true[/code] if the video is playing. [b]Note:[/b] The video is still considered playing if paused during playback.
func (Instance) OnFinished ¶
func (self Instance) OnFinished(cb func())
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) SetStream ¶
func (self Instance) SetStream(value [1]gdclass.VideoStream)
func (Instance) SetStreamPosition ¶
func (Instance) SetVolumeDb ¶
func (Instance) Stop ¶
func (self Instance) Stop()
Stops the video playback and sets the stream position to 0. [b]Note:[/b] 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() [1]gdclass.VideoStream