Video player develop,emt 3
This commit is contained in:
@@ -40,6 +40,8 @@ namespace FoxTube
|
|||||||
private bool fullScreen = false;
|
private bool fullScreen = false;
|
||||||
private bool pointerCaptured = false;
|
private bool pointerCaptured = false;
|
||||||
|
|
||||||
|
UIElement rootBackup;
|
||||||
|
|
||||||
TimeSpan elapsed;
|
TimeSpan elapsed;
|
||||||
TimeSpan remaining;
|
TimeSpan remaining;
|
||||||
TimeSpan total;
|
TimeSpan total;
|
||||||
@@ -95,7 +97,7 @@ namespace FoxTube
|
|||||||
|
|
||||||
item = response.Items[0];
|
item = response.Items[0];
|
||||||
|
|
||||||
if(item.ContentDetails.ContentRating.RussiaRating == "russia18")
|
if(item.ContentDetails.ContentRating != null && item.ContentDetails.ContentRating.YtRating == "ytAgeRestricted")
|
||||||
{
|
{
|
||||||
matureBlock.Visibility = Visibility.Visible;
|
matureBlock.Visibility = Visibility.Visible;
|
||||||
return;
|
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)
|
if (fullScreen)
|
||||||
{
|
{
|
||||||
|
Window.Current.Content = rootBackup;
|
||||||
ApplicationView.GetForCurrentView().ExitFullScreenMode();
|
ApplicationView.GetForCurrentView().ExitFullScreenMode();
|
||||||
fullScreen = false;
|
fullScreen = false;
|
||||||
}
|
}
|
||||||
else fullScreen = ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
|
else
|
||||||
|
{
|
||||||
|
rootBackup = Window.Current.Content;
|
||||||
|
Window.Current.Content = this;
|
||||||
|
fullScreen = ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
|
||||||
|
}
|
||||||
if ((string)fullscreen.Content == "")
|
if ((string)fullscreen.Content == "")
|
||||||
|
|
||||||
fullscreen.Content = "";
|
fullscreen.Content = "";
|
||||||
else fullscreen.Content = "";
|
else fullscreen.Content = "";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user