VideoStreamPlayer

package
v0.0.0-...-fa94a0d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2025 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

A control used for playback of VideoStream resources.

Supported video formats are Ogg Theora (.ogv, 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

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 Any

type Any interface {
	gd.IsClass
	AsVideoStreamPlayer() Instance
}

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

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]) AsControl

func (self *Extension[T]) AsControl() Control.Instance

func (*Extension[T]) AsNode

func (self *Extension[T]) AsNode() Node.Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsVideoStreamPlayer

func (self *Extension[T]) AsVideoStreamPlayer() Instance

type ID

type ID Object.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.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

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 New

func New() Instance

func (Instance) AsCanvasItem

func (self Instance) AsCanvasItem() CanvasItem.Instance

func (Instance) AsControl

func (self Instance) AsControl() Control.Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsVideoStreamPlayer

func (self Instance) AsVideoStreamPlayer() Instance

func (Instance) AudioTrack

func (self Instance) AudioTrack() int

func (Instance) Autoplay

func (self Instance) Autoplay() bool

func (Instance) BufferingMsec

func (self Instance) BufferingMsec() int

func (Instance) Bus

func (self Instance) Bus() string

func (Instance) Expand

func (self Instance) Expand() bool

func (Instance) GetStreamLength

func (self Instance) GetStreamLength() Float.X

The length of the current stream, in seconds.

func (Instance) GetStreamName

func (self Instance) GetStreamName() string

Returns the video stream's name, or "<No Stream>" if no video stream is assigned.

func (Instance) GetVideoTexture

func (self Instance) GetVideoTexture() Texture2D.Instance

Returns the current frame as a Texture2D.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) IsPlaying

func (self Instance) IsPlaying() bool

Returns true if the video is playing.

Note: The video is still considered playing if paused during playback.

func (Instance) Loop

func (self Instance) Loop() bool

func (Instance) OnFinished

func (self Instance) OnFinished(cb func(), flags ...Signal.Flags)

func (Instance) Paused

func (self Instance) Paused() bool

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 (self Instance) SetAudioTrack(value int)

func (Instance) SetAutoplay

func (self Instance) SetAutoplay(value bool)

func (Instance) SetBufferingMsec

func (self Instance) SetBufferingMsec(value int)

func (Instance) SetBus

func (self Instance) SetBus(value string)

func (Instance) SetExpand

func (self Instance) SetExpand(value bool)

func (Instance) SetLoop

func (self Instance) SetLoop(value bool)

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetPaused

func (self Instance) SetPaused(value bool)

func (Instance) SetSpeedScale

func (self Instance) SetSpeedScale(value Float.X)

func (Instance) SetStream

func (self Instance) SetStream(value VideoStream.Instance)

func (Instance) SetStreamPosition

func (self Instance) SetStreamPosition(value Float.X)

func (Instance) SetVolume

func (self Instance) SetVolume(value Float.X)

func (Instance) SetVolumeDb

func (self Instance) SetVolumeDb(value Float.X)

func (Instance) SpeedScale

func (self Instance) SpeedScale() Float.X

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

func (Instance) StreamPosition

func (self Instance) StreamPosition() Float.X

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

func (Instance) Volume

func (self Instance) Volume() Float.X

func (Instance) VolumeDb

func (self Instance) VolumeDb() Float.X

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL