private void load(IBindable <WorkingBeatmap> beatmap, TextureStore textureStore) { var path = beatmap.Value.BeatmapSetInfo?.Files?.Find(f => f.Filename.Equals(Video.Path, StringComparison.OrdinalIgnoreCase))?.FileInfo.StoragePath; if (path == null) { return; } var stream = textureStore.GetStream(path); if (stream == null) { return; } InternalChild = video = new Video(stream, false) { RelativeSizeAxes = Axes.Both, FillMode = FillMode.Fill, Anchor = Anchor.Centre, Origin = Anchor.Centre, Alpha = 0, PlaybackPosition = Video.StartTime }; }
protected override VideoSprite GetVideo() { if (Metadata?.VideoFile == null) { return(null); } try { return(new VideoSprite(textureStore.GetStream(getPathForFile(Metadata.VideoFile)))); } catch { return(null); } }
private void load(TextureStore textures, OsuGameBase game) { this.game = game; InternalChildren = new Drawable[] { triangles = new GlitchingTriangles { Alpha = 0, Anchor = Anchor.Centre, Origin = Anchor.Centre, Size = new Vector2(0.4f, 0.16f) }, welcomeText = new OsuSpriteText { Anchor = Anchor.Centre, Origin = Anchor.Centre, Padding = new MarginPadding { Bottom = 10 }, Font = OsuFont.GetFont(weight: FontWeight.Light, size: 42), Alpha = 1, Spacing = new Vector2(5), }, rulesetsScale = new Container { RelativeSizeAxes = Axes.Both, Anchor = Anchor.Centre, Origin = Anchor.Centre, Children = new Drawable[] { rulesets = new RulesetFlow() } }, logoContainerSecondary = new Container { RelativeSizeAxes = Axes.Both, Anchor = Anchor.Centre, Origin = Anchor.Centre, Child = lazerLogo = new LazerLogo(textures.GetStream("Menu/logo-triangles.mp4")) { Anchor = Anchor.Centre, Origin = Anchor.Centre, } }, }; }
protected override VideoSprite GetVideo() { if (Metadata?.VideoFile == null) { return(null); } try { return(new VideoSprite(textureStore.GetStream(getPathForFile(Metadata.VideoFile)))); } catch (Exception e) { Logger.Error(e, "Video failed to load"); return(null); } }