Fix fade-in no longer working on videos

This commit is contained in:
Dean Herbert 2024-04-23 22:03:32 +08:00
parent 564dec7a14
commit 602b16f533
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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);