VideoPlayer

Inherits: Control < CanvasItem < Node < Object

Control para la reproducción de streams de vídeo.

Descripción

Control node for playing video streams using VideoStream resources.

Supported video formats are WebM (.webm, VideoStreamWebm), Ogg Theora (.ogv, VideoStreamTheora), and any format exposed via a GDNative plugin using VideoStreamGDNative.

Note: Due to a bug, VideoPlayer does not support localization remapping yet.

Warning: On HTML5, video playback will perform poorly due to missing architecture-specific assembly optimizations, especially for VP8/VP9.

Propiedades

int

audio_track

0

bool

autoplay

false

int

buffering_msec

500

String

bus

"Master"

bool

expand

true

bool

paused

false

VideoStream

stream

float

stream_position

float

volume

float

volume_db

0.0

Métodos

String

get_stream_name ( ) const

Texture

get_video_texture ( ) const

bool

is_playing ( ) const

void

play ( )

void

stop ( )

Señales

  • finished ( )

Se emite cuando termina la reproducción.

Descripciones de Propiedades

  • int audio_track

Default

0

Setter

set_audio_track(value)

Getter

get_audio_track()

La pista de audio incrustada para reproducir.


Default

false

Setter

set_autoplay(value)

Getter

has_autoplay()

Si true, la reproducción comienza cuando la escena se carga.


  • int buffering_msec

Default

500

Setter

set_buffering_msec(value)

Getter

get_buffering_msec()

Cantidad de tiempo en milisegundos para almacenar en el buffer mientras se juega.


Default

"Master"

Setter

set_bus(value)

Getter

get_bus()

Bus de audio para usar para la reproducción de sonido.


Default

true

Setter

set_expand(value)

Getter

has_expand()

Si true, el video se escala al tamaño de control. En caso contrario, el tamaño mínimo de control se ajustará automáticamente para que coincida con las dimensiones del stream de vídeo.


Default

false

Setter

set_paused(value)

Getter

is_paused()

Si true, el video se pausa.


Setter

set_stream(value)

Getter

get_stream()

El stream de video asignado. Véase la descripción de los formatos soportados.


Setter

set_stream_position(value)

Getter

get_stream_position()

The current position of the stream, in seconds.

Note: Changing this value won't have any effect as seeking is not implemented yet, except in video formats implemented by a GDNative add-on.


Setter

set_volume(value)

Getter

get_volume()

El volumen del audio como un valor lineal.


Default

0.0

Setter

set_volume_db(value)

Getter

get_volume_db()

Volumen de audio en dB.

Descripciones de Métodos

  • String get_stream_name ( ) const

Devuelve el nombre del stream de video, o "<No Stream>" si no hay stream de video asignado.


  • Texture get_video_texture ( ) const

Returns the current frame as a Texture.


  • bool is_playing ( ) const

Devuelve true si el video se está reproduciendo.

Nota: El vídeo sigue considerándose en reproducción si se interrumpe durante la reproducción.


  • void play ( )

Inicia la reproducción del video desde el principio. Si el vídeo está en pausa, esto no la desactivará.


  • void stop ( )

Detiene la reproducción del video y establece la posición del streaming en 0.

Nota: Aunque la posición del stream se establezca en 0, el primer fotograma del stream de vídeo no se convertirá en el fotograma actual.