Fixed background music playing momentarily in AssetBrowser when switching to a video asset
This commit is contained in:
committed by
Matthias Mailänder
parent
001efc9409
commit
631297417c
@@ -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<VideoPlayerWidget>("PLAYER");
|
||||
player.Load(prefix + filename);
|
||||
player.DrawOverlay = false;
|
||||
|
||||
Reference in New Issue
Block a user