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¶
|
||
|
||
|
||
|
||
|
||
|
||
|
Métodos¶
get_stream_name ( ) const |
|
get_video_texture ( ) const |
|
is_playing ( ) const |
|
void |
play ( ) |
void |
stop ( ) |
Señales¶
finished ( )
Se emite cuando termina la reproducción.
Descripciones de Propiedades¶
int audio_track
Default |
|
Setter |
set_audio_track(value) |
Getter |
get_audio_track() |
La pista de audio incrustada para reproducir.
bool autoplay
Default |
|
Setter |
set_autoplay(value) |
Getter |
has_autoplay() |
Si true
, la reproducción comienza cuando la escena se carga.
int buffering_msec
Default |
|
Setter |
set_buffering_msec(value) |
Getter |
get_buffering_msec() |
Cantidad de tiempo en milisegundos para almacenar en el buffer mientras se juega.
String bus
Default |
|
Setter |
set_bus(value) |
Getter |
get_bus() |
Bus de audio para usar para la reproducción de sonido.
bool expand
Default |
|
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.
bool paused
Default |
|
Setter |
set_paused(value) |
Getter |
is_paused() |
Si true
, el video se pausa.
VideoStream stream
Setter |
set_stream(value) |
Getter |
get_stream() |
El stream de video asignado. Véase la descripción de los formatos soportados.
float stream_position
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.
float volume
Setter |
set_volume(value) |
Getter |
get_volume() |
El volumen del audio como un valor lineal.
float volume_db
Default |
|
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.