Skip to content

Commit b257e12

Browse files
committed
Fix video player disposed after foreground load
1 parent 3efdec9 commit b257e12

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

BackgroundTest/CustomControl/LayeredBackgroundImage/LayeredBackgroundImage.Events.Loaders.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,10 @@ private async void LoadFromSourceAsyncDetached(
174174
return;
175175
}
176176

177-
DisposeVideoPlayer();
177+
if (grid.Name.StartsWith("Background"))
178+
{
179+
DisposeVideoPlayer();
180+
}
178181

179182
object? source = GetValue(sourceProperty);
180183
if (source is null)

0 commit comments

Comments
 (0)