Video player develop,emt 3
This commit is contained in:
@@ -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 = "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user