Video player except of captions, fullscreen and rotation management
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user