.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_VideoPlayer: VideoPlayer =========== **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Control to play video files. Member Functions ---------------- +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_audio_track` **(** **)** const | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_buffering_msec` **(** **)** const | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`VideoStream` | :ref:`get_stream` **(** **)** const | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_stream_name` **(** **)** const | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_stream_pos` **(** **)** const | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`Texture` | :ref:`get_video_texture` **(** **)** | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_volume` **(** **)** const | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_volume_db` **(** **)** const | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_autoplay` **(** **)** const | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_expand` **(** **)** const | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_paused` **(** **)** const | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_playing` **(** **)** const | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | void | :ref:`play` **(** **)** | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_audio_track` **(** :ref:`int` track **)** | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_autoplay` **(** :ref:`bool` enabled **)** | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_buffering_msec` **(** :ref:`int` msec **)** | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_expand` **(** :ref:`bool` enable **)** | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_paused` **(** :ref:`bool` paused **)** | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_stream` **(** :ref:`VideoStream` stream **)** | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_volume` **(** :ref:`float` volume **)** | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_volume_db` **(** :ref:`float` db **)** | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ | void | :ref:`stop` **(** **)** | +----------------------------------------+------------------------------------------------------------------------------------------------------------+ Description ----------- This control has the ability to play video streams. The only format accepted is the OGV Theora, so any other format must be converted before using in a project. Member Function Description --------------------------- .. _class_VideoPlayer_get_audio_track: - :ref:`int` **get_audio_track** **(** **)** const Get the selected audio track (for multitrack videos). .. _class_VideoPlayer_get_buffering_msec: - :ref:`int` **get_buffering_msec** **(** **)** const Get the amount of miliseconds to store in buffer while playing. .. _class_VideoPlayer_get_stream: - :ref:`VideoStream` **get_stream** **(** **)** const Get the video stream. .. _class_VideoPlayer_get_stream_name: - :ref:`String` **get_stream_name** **(** **)** const Get the name of the video stream. .. _class_VideoPlayer_get_stream_pos: - :ref:`float` **get_stream_pos** **(** **)** const Get the current position of the stream, in seconds. .. _class_VideoPlayer_get_video_texture: - :ref:`Texture` **get_video_texture** **(** **)** Get the current frame of the video as a :ref:`Texture`. .. _class_VideoPlayer_get_volume: - :ref:`float` **get_volume** **(** **)** const Get the volume of the audio track as a linear value. .. _class_VideoPlayer_get_volume_db: - :ref:`float` **get_volume_db** **(** **)** const Get the volume of the audio track in decibels. .. _class_VideoPlayer_has_autoplay: - :ref:`bool` **has_autoplay** **(** **)** const Get whether or not the video is set as autoplay. .. _class_VideoPlayer_has_expand: - :ref:`bool` **has_expand** **(** **)** const Get whether or not the expand property is set. .. _class_VideoPlayer_is_paused: - :ref:`bool` **is_paused** **(** **)** const Get whether or not the video is paused. .. _class_VideoPlayer_is_playing: - :ref:`bool` **is_playing** **(** **)** const Get whether or not the video is playing. .. _class_VideoPlayer_play: - void **play** **(** **)** Start the video playback. .. _class_VideoPlayer_set_audio_track: - void **set_audio_track** **(** :ref:`int` track **)** Set the audio track (for multitrack videos). .. _class_VideoPlayer_set_autoplay: - void **set_autoplay** **(** :ref:`bool` enabled **)** Set whether this node should start playing automatically. .. _class_VideoPlayer_set_buffering_msec: - void **set_buffering_msec** **(** :ref:`int` msec **)** Set the amount of miliseconds to buffer during playback. .. _class_VideoPlayer_set_expand: - void **set_expand** **(** :ref:`bool` enable **)** Set the expand property. If enabled, the video will grow or shrink to fit the player size, otherwise it will play at the stream resolution. .. _class_VideoPlayer_set_paused: - void **set_paused** **(** :ref:`bool` paused **)** Set whether the video should pause the playback. .. _class_VideoPlayer_set_stream: - void **set_stream** **(** :ref:`VideoStream` stream **)** Set the video stream for this player. .. _class_VideoPlayer_set_volume: - void **set_volume** **(** :ref:`float` volume **)** Set the audio volume as a linear value. .. _class_VideoPlayer_set_volume_db: - void **set_volume_db** **(** :ref:`float` db **)** Set the audio volume in decibels. .. _class_VideoPlayer_stop: - void **stop** **(** **)** Stop the video playback.