summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2022-07-06 00:43:09 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2022-07-06 00:51:27 +0200
commit983ce7e9f37dbf36da3fa3775e315cf0ba40989a (patch)
treeafeec3ac354a8fd48f2b7095077e367b4402905e
parent1b057e18f24694cd2ece6f81ed079d6a63d33ae6 (diff)
Disable Expand by default in VideoStreamPlayer
This ensures videos are always visible as soon as a video file is specified in the VideoStreamPlayer node. The node will no longer be resized to 0×0 by default, making the video invisible in the process (even if the audio can still be heard).
-rw-r--r--doc/classes/VideoStreamPlayer.xml2
-rw-r--r--scene/gui/video_stream_player.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/classes/VideoStreamPlayer.xml b/doc/classes/VideoStreamPlayer.xml
index 092a754a39..f6594ff9e7 100644
--- a/doc/classes/VideoStreamPlayer.xml
+++ b/doc/classes/VideoStreamPlayer.xml
@@ -58,7 +58,7 @@
<member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&amp;&quot;Master&quot;">
Audio bus to use for sound playback.
</member>
- <member name="expand" type="bool" setter="set_expand" getter="has_expand" default="true">
+ <member name="expand" type="bool" setter="set_expand" getter="has_expand" default="false">
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.
</member>
<member name="paused" type="bool" setter="set_paused" getter="is_paused" default="false">
diff --git a/scene/gui/video_stream_player.h b/scene/gui/video_stream_player.h
index d2822a989b..913e7905b6 100644
--- a/scene/gui/video_stream_player.h
+++ b/scene/gui/video_stream_player.h
@@ -64,7 +64,7 @@ class VideoStreamPlayer : public Control {
bool autoplay = false;
float volume = 1.0;
double last_audio_time = 0.0;
- bool expand = true;
+ bool expand = false;
bool loops = false;
int buffering_ms = 500;
int audio_track = 0;