Archived
1
0

Video player develop,emt 3

This commit is contained in:
Michael Gordeev
2018-06-18 14:33:31 +03:00
parent fba1341692
commit 5c164332de
+11 -7
View File
@@ -40,6 +40,8 @@ namespace FoxTube
private bool fullScreen = false;
private bool pointerCaptured = false;
UIElement rootBackup;
TimeSpan elapsed;
TimeSpan remaining;
TimeSpan total;
@@ -95,7 +97,7 @@ namespace FoxTube
item = response.Items[0];
if(item.ContentDetails.ContentRating.RussiaRating == "russia18")
if(item.ContentDetails.ContentRating != null && item.ContentDetails.ContentRating.YtRating == "ytAgeRestricted")
{
matureBlock.Visibility = Visibility.Visible;
return;
@@ -321,19 +323,21 @@ namespace FoxTube
}
private async void fullscreen_Click(object sender, RoutedEventArgs e)
private void fullscreen_Click(object sender, RoutedEventArgs e)
{
if (miniViewed)
miniViewed = await ApplicationView.GetForCurrentView().TryEnterViewModeAsync(ApplicationViewMode.Default);
if (fullScreen)
{
Window.Current.Content = rootBackup;
ApplicationView.GetForCurrentView().ExitFullScreenMode();
fullScreen = false;
}
else fullScreen = ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
else
{
rootBackup = Window.Current.Content;
Window.Current.Content = this;
fullScreen = ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
}
if ((string)fullscreen.Content == "")
fullscreen.Content = "";
else fullscreen.Content = "";
}