From 631297417c54c007c384ab02455bc4b7c9b56c9c Mon Sep 17 00:00:00 2001 From: penev92 Date: Tue, 4 Jan 2022 23:14:40 +0200 Subject: [PATCH] Fixed background music playing momentarily in AssetBrowser when switching to a video asset --- OpenRA.Mods.Common/Widgets/Logic/AssetBrowserLogic.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/AssetBrowserLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/AssetBrowserLogic.cs index 2c9e896096..d966d48e86 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/AssetBrowserLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/AssetBrowserLogic.cs @@ -500,12 +500,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic } else if (allowedVideoExtensions.Contains(fileExtension)) { + // Mute music so it doesn't interfere with the current asset. + MuteSounds(); + var video = VideoLoader.GetVideo(Game.ModData.DefaultFileSystem.Open(filename), Game.ModData.VideoLoaders); if (video != null) { - // Mute music so it doesn't interfere with the current asset. - MuteSounds(); - player = panel.Get("PLAYER"); player.Load(prefix + filename); player.DrawOverlay = false;