From cab764659dc298b5d504c6f6ec4e542f945f3149 Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Thu, 3 Jan 2019 20:38:06 +0300 Subject: [PATCH] Fullscreen mode fixes Related Work Items: #240 --- FoxTube/Controls/VideoPlayer.xaml.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/FoxTube/Controls/VideoPlayer.xaml.cs b/FoxTube/Controls/VideoPlayer.xaml.cs index 68c1db5..7f013da 100644 --- a/FoxTube/Controls/VideoPlayer.xaml.cs +++ b/FoxTube/Controls/VideoPlayer.xaml.cs @@ -333,7 +333,7 @@ namespace FoxTube public void UpdateSize() { - if(layout == PlayerLayout.Minimized) + if(layout != PlayerLayout.Normal) Height = Window.Current.Bounds.Height; } @@ -455,8 +455,6 @@ namespace FoxTube if (streamInfo.Muxed.ToList().Exists(x => x.VideoQualityLabel == (quality.SelectedItem as ComboBoxItem).Content.ToString())) { videoPlayer.Source = MediaSource.CreateFromUri(streamInfo.Muxed.Find(x => x.VideoQualityLabel == (quality.SelectedItem as ComboBoxItem).Content as string).Url.ToUri()); - - audioPlayer?.Dispose(); audioPlayer = null; } else @@ -509,15 +507,14 @@ namespace FoxTube { ApplicationView.GetForCurrentView().TryEnterFullScreenMode(); fullscreen.Content = "\xE1D8"; - Height = Methods.MainPage.Height; layout = PlayerLayout.Fullscreen; } else { ApplicationView.GetForCurrentView().ExitFullScreenMode(); fullscreen.Content = "\xE1D9"; - Height = double.NaN; layout = PlayerLayout.Normal; + Height = double.NaN; } }