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
@@ -499,13 +499,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (allowedVideoExtensions.Contains(fileExtension))
|
else if (allowedVideoExtensions.Contains(fileExtension))
|
||||||
{
|
|
||||||
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.
|
// Mute music so it doesn't interfere with the current asset.
|
||||||
MuteSounds();
|
MuteSounds();
|
||||||
|
|
||||||
|
var video = VideoLoader.GetVideo(Game.ModData.DefaultFileSystem.Open(filename), Game.ModData.VideoLoaders);
|
||||||
|
if (video != null)
|
||||||
|
{
|
||||||
player = panel.Get<VideoPlayerWidget>("PLAYER");
|
player = panel.Get<VideoPlayerWidget>("PLAYER");
|
||||||
player.Load(prefix + filename);
|
player.Load(prefix + filename);
|
||||||
player.DrawOverlay = false;
|
player.DrawOverlay = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user