From 602b16f533dd5e578025144d025dc3a9c7336fa7 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 23 Apr 2024 22:03:32 +0800 Subject: [PATCH] Fix fade-in no longer working on videos --- .../Visual/Gameplay/TestSceneDrawableStoryboardSprite.cs | 2 -- osu.Game/Storyboards/StoryboardVideo.cs | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneDrawableStoryboardSprite.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneDrawableStoryboardSprite.cs index fc52d749b3..8fa2c9922e 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneDrawableStoryboardSprite.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneDrawableStoryboardSprite.cs @@ -83,8 +83,6 @@ public void TestVideo(bool scaleTransformProvided) var sprite = new StoryboardVideo("Videos/test-video.mp4", Time.Current); - sprite.AddLoop(Time.Current, 100).Alpha.Add(Easing.None, 0, 10000, 1, 1); - if (scaleTransformProvided) { sprite.TimelineGroup.Scale.Add(Easing.None, Time.Current, Time.Current + 1000, 1, 2); diff --git a/osu.Game/Storyboards/StoryboardVideo.cs b/osu.Game/Storyboards/StoryboardVideo.cs index bd1b933b6f..5573162d26 100644 --- a/osu.Game/Storyboards/StoryboardVideo.cs +++ b/osu.Game/Storyboards/StoryboardVideo.cs @@ -12,7 +12,9 @@ public class StoryboardVideo : StoryboardSprite public StoryboardVideo(string path, double offset) : base(path, Anchor.Centre, Vector2.Zero) { - TimelineGroup.Alpha.Add(Easing.None, offset, offset, 0, 1); + // This is just required to get a valid StartTime based on the incoming offset. + // Actual fades are handled inside DrawableStoryboardVideo for now. + TimelineGroup.Alpha.Add(Easing.None, offset, offset, 0, 0); } public override Drawable CreateDrawable() => new DrawableStoryboardVideo(this);