Skip to content

Commit

Permalink
Merge pull request #3072 from unoplatform/dev/jeth/player-ratio
Browse files Browse the repository at this point in the history
fix(mediaplayer): Arranges the player even if the video ratio is of 0 as this will lead to a real video ratio.
  • Loading branch information
jeremiethibeault authored Apr 28, 2020
2 parents 726ee32 + 0ac5e31 commit 17fe506
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Uno.UI/UI/Xaml/Controls/MediaPlayer/MediaPlayerPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ private void OnVideoRatioChanged(Windows.Media.Playback.MediaPlayer sender, doub
if (args > 0) // The VideoRect may initially be empty, ignore because a 0 ratio will lead to infinite dims being returned on measure, resulting in an exception
{
_currentRatio = args;
}

Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
Visibility = Visibility.Visible;
});
Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
Visibility = Visibility.Visible;
});

InvalidateArrange();
}
InvalidateArrange();
}

private void OnMediaFailed(Windows.Media.Playback.MediaPlayer sender, MediaPlayerFailedEventArgs args)
Expand Down

0 comments on commit 17fe506

Please sign in to comment.