Archived
1
0

Video player except of captions, fullscreen and rotation management

This commit is contained in:
Michael Gordeev
2018-08-04 00:24:41 +03:00
parent c996da2bfb
commit 9edd432ae8
7 changed files with 255 additions and 333 deletions
+4
View File
@@ -186,6 +186,9 @@ namespace FoxTube
content.CacheSize = 0;
content.Navigate(typeof(Home));
if (videoPlaceholder.Content != null)
(videoPlaceholder.Content as VideoPage).refresh_Click(this, null);
}
protected override void OnNavigatedTo(NavigationEventArgs e)
@@ -504,6 +507,7 @@ namespace FoxTube
{
(videoPlaceholder.Content as VideoPage).player.minimize_Click(this, null);
}
catch { }
}
public void MinimizeVideo()
+7 -1
View File
@@ -67,6 +67,7 @@ namespace FoxTube.Pages
loading.RefreshPage += refresh_Click;
player = mainContent.Children[0] as VideoPlayer;
player.SetFullSize += Player_SetFullSize;
player.NextClicked += Player_NextClicked;
comments = commentsPlaceholder.Content as CommentsPage;
DataTransferManager.GetForCurrentView().DataRequested += new TypedEventHandler<DataTransferManager, DataRequestedEventArgs>(Share);
@@ -91,6 +92,11 @@ namespace FoxTube.Pages
}
}
private void Player_NextClicked(object sender, EventArgs e)
{
(relatedVideos.Children[0] as VideoCard).Button_Click(this, null);
}
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
@@ -271,7 +277,7 @@ namespace FoxTube.Pages
await Launcher.LaunchUriAsync(new Uri($"https://www.youtube.com/watch?v={videoId}{timecode}"));
}
private void refresh_Click(object sender, RoutedEventArgs e)
public void refresh_Click(object sender, RoutedEventArgs e)
{
player = new VideoPlayer();
Initialize(videoId);