Debian Codegraph @

doc/classes/VideoStreamPlayer.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <class name="VideoStreamPlayer" inherits="Control" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 A control used for video playback.
5 </brief_description>
6 <description>
7 A control used for playback of [VideoStream] resources.
8 Supported video formats are [url=https://www.theora.org/]Ogg Theora[/url] ([code].ogv[/code], [VideoStreamTheora]) and any format exposed via a GDExtension plugin.
9 [b]Warning:[/b] On Web, video playback [i]will[/i] perform poorly due to missing architecture-specific assembly optimizations.
10 </description>
11 <tutorials>
12 <link title="Playing videos">$DOCS_URL/tutorials/animation/playing_videos.html</link>
13 </tutorials>
14 <methods>
15 <method name="get_stream_length" qualifiers="const">
16 <return type="float" />
17 <description>
18 The length of the current stream, in seconds.
19 </description>
20 </method>
21 <method name="get_stream_name" qualifiers="const">
22 <return type="String" />
23 <description>
24 Returns the video stream's name, or [code]"&lt;No Stream&gt;"[/code] if no video stream is assigned.
25 </description>
26 </method>
27 <method name="get_video_texture" qualifiers="const">
28 <return type="Texture2D" />
29 <description>
30 Returns the current frame as a [Texture2D].
31 </description>
32 </method>
33 <method name="is_playing" qualifiers="const">
34 <return type="bool" />
35 <description>
36 Returns [code]true[/code] if the video is playing.
37 [b]Note:[/b] The video is still considered playing if paused during playback.
38 </description>
39 </method>
40 <method name="play">
41 <return type="void" />
42 <description>
43 Starts the video playback from the beginning. If the video is paused, this will not unpause the video.
44 </description>
45 </method>
46 <method name="stop">
47 <return type="void" />
48 <description>
49 Stops the video playback and sets the stream position to 0.
50 [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.
51 </description>
52 </method>
53 </methods>
54 <members>
55 <member name="audio_track" type="int" setter="set_audio_track" getter="get_audio_track" default="0">
56 The embedded audio track to play.
57 </member>
58 <member name="autoplay" type="bool" setter="set_autoplay" getter="has_autoplay" default="false">
59 If [code]true[/code], playback starts when the scene loads.
60 </member>
61 <member name="buffering_msec" type="int" setter="set_buffering_msec" getter="get_buffering_msec" default="500">
62 Amount of time in milliseconds to store in buffer while playing.
63 </member>
64 <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&amp;&quot;Master&quot;">
65 Audio bus to use for sound playback.
66 </member>
67 <member name="expand" type="bool" setter="set_expand" getter="has_expand" default="false">
68 If [code]true[/code], the video scales to the control size. Otherwise, the control minimum size will be automatically adjusted to match the video stream's dimensions.
69 </member>
70 <member name="loop" type="bool" setter="set_loop" getter="has_loop" default="false">
71 If [code]true[/code], the video restarts when it reaches its end.
72 </member>
73 <member name="paused" type="bool" setter="set_paused" getter="is_paused" default="false">
74 If [code]true[/code], the video is paused.
75 </member>
76 <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
77 The stream's current speed scale. [code]1.0[/code] is the normal speed, while [code]2.0[/code] is double speed and [code]0.5[/code] is half speed. A speed scale of [code]0.0[/code] pauses the video, similar to setting [member paused] to [code]true[/code].
78 </member>
79 <member name="stream" type="VideoStream" setter="set_stream" getter="get_stream">
80 The assigned video stream. See description for supported formats.
81 </member>
82 <member name="stream_position" type="float" setter="set_stream_position" getter="get_stream_position">
83 The current position of the stream, in seconds.
84 </member>
85 <member name="volume" type="float" setter="set_volume" getter="get_volume">
86 Audio volume as a linear value.
87 </member>
88 <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0">
89 Audio volume in dB.
90 </member>
91 </members>
92 <signals>
93 <signal name="finished">
94 <description>
95 Emitted when playback is finished.
96 </description>
97 </signal>
98 </signals>
99 </class>