@@ -154,7 +154,7 @@
|
||||
<Grid VerticalAlignment="Top" Margin="0,15,0,0" Height="2">
|
||||
<ProgressBar Background="#66FFFFFF" Foreground="LightGray" Name="bufferingLevel"/>
|
||||
</Grid>
|
||||
<Slider PointerCaptureLost="seek_PointerCaptureLost" ValueChanged="seek_ValueChanged" Name="seek" VerticalAlignment="Top" IsThumbToolTipEnabled="False" Background="Transparent" HorizontalAlignment="Stretch"/>
|
||||
<Slider PointerCaptureLost="seek_PointerCaptureLost" ManipulationStarted="Seek_PointerCaptured" ManipulationMode="TranslateRailsX" ValueChanged="seek_ValueChanged" Name="seek" VerticalAlignment="Top" IsThumbToolTipEnabled="False" Background="Transparent" HorizontalAlignment="Stretch"/>
|
||||
</Grid>
|
||||
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace FoxTube
|
||||
|
||||
public PlayerLayout layout = PlayerLayout.Normal;
|
||||
public bool pointerCaptured = false;
|
||||
bool seekCaptured = false;
|
||||
Point cursorBackup;
|
||||
|
||||
public event ObjectEventHandler SetFullSize;
|
||||
@@ -292,9 +293,16 @@ namespace FoxTube
|
||||
{
|
||||
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
|
||||
{
|
||||
bufferingLevel.Value = videoPlayer.PlaybackSession.DownloadProgress * 100;
|
||||
if (seekCaptured)
|
||||
return;
|
||||
if(needUpdateTimecode)
|
||||
if (controller.State == MediaTimelineControllerState.Running)
|
||||
needUpdateTimecode = false;
|
||||
else
|
||||
return;
|
||||
seek.Value = controller.Position.TotalMilliseconds;
|
||||
seekIndicator.Value = seek.Value;
|
||||
bufferingLevel.Value = videoPlayer.PlaybackSession.DownloadProgress * 100;
|
||||
});
|
||||
}
|
||||
catch { }
|
||||
@@ -323,6 +331,9 @@ namespace FoxTube
|
||||
|
||||
void ControlsFade(object sender, object e)
|
||||
{
|
||||
if (seekCaptured)
|
||||
return;
|
||||
|
||||
controls.Visibility = Visibility.Collapsed;
|
||||
if (layout != PlayerLayout.Minimized)
|
||||
touchCentral.Visibility = Visibility.Collapsed;
|
||||
@@ -531,6 +542,7 @@ namespace FoxTube
|
||||
{
|
||||
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
|
||||
{
|
||||
needUpdateTimecode = false;
|
||||
switch (sender.State)
|
||||
{
|
||||
case MediaTimelineControllerState.Paused:
|
||||
@@ -679,6 +691,8 @@ namespace FoxTube
|
||||
|
||||
private void seek_PointerCaptureLost(object sender, PointerRoutedEventArgs e)
|
||||
{
|
||||
seekCaptured = false;
|
||||
needUpdateTimecode = true;
|
||||
controller.Position = Elapsed;
|
||||
}
|
||||
|
||||
@@ -787,5 +801,10 @@ namespace FoxTube
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void Seek_PointerCaptured(object sender, ManipulationStartedRoutedEventArgs e)
|
||||
{
|
||||
seekCaptured = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
<StackPanel Name="wifiTrouble" Visibility="Collapsed" VerticalAlignment="Center">
|
||||
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="" FontSize="100" HorizontalAlignment="Center"/>
|
||||
<TextBlock x:Uid="/LoadingPage/checkConnection" Text="Check your internet connection" FontSize="48" HorizontalAlignment="Center"/>
|
||||
<TextBlock x:Uid="/LoadingPage/wifiDesc" Text="Please, make sure you are connected to the internet and try again." HorizontalAlignment="Center"/>
|
||||
<TextBlock x:Uid="/LoadingPage/checkConnection" Text="Check your internet connection" TextWrapping="WrapWholeWords" FontSize="48" HorizontalAlignment="Center" HorizontalTextAlignment="Center"/>
|
||||
<TextBlock x:Uid="/LoadingPage/wifiDesc" Text="Please, make sure you are connected to the internet and try again." HorizontalAlignment="Center" TextWrapping="WrapWholeWords" HorizontalTextAlignment="Center"/>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button x:Uid="/LoadingPage/openWifi" Content="Open network settings" Margin="5" Name="openWifi" Click="openWifi_Click"/>
|
||||
<Button x:Uid="/LoadingPage/openTroubleshooter" Content="Open troubleshooter" Background="Red" Foreground="White" Margin="5" Name="openTroubleshoot" Click="openTroubleshoot_Click"/>
|
||||
@@ -20,19 +20,19 @@
|
||||
<TextBlock x:Uid="/LoadingPage/or" Text="OR" FontSize="20" HorizontalAlignment="Center"/>
|
||||
<Button x:Uid="/LoadingPage/refresh" Name="wifiRefresh" Click="wifiRefresh_Click" Content="Refresh page" HorizontalAlignment="Center" Background="Red" Foreground="White" Margin="5"/>
|
||||
<TextBlock Name="wifiException" Foreground="Gray" Text="Exception:" HorizontalAlignment="Center" IsTextSelectionEnabled="True"/>
|
||||
<TextBlock Name="wifiMessage" Foreground="Gray" Text="Message:" HorizontalAlignment="Center" IsTextSelectionEnabled="True"/>
|
||||
<TextBlock Name="wifiMessage" Foreground="Gray" Text="Message:" HorizontalAlignment="Center" IsTextSelectionEnabled="True" TextWrapping="WrapWholeWords"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Name="trouble" Visibility="Collapsed" VerticalAlignment="Center">
|
||||
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="" FontSize="100" HorizontalAlignment="Center"/>
|
||||
<TextBlock x:Uid="/LoadingPage/err" Text="We are unable to display the page" FontSize="48" HorizontalAlignment="Center"/>
|
||||
<TextBlock x:Uid="/LoadingPage/errDescription" Text="It could be caused by YouTube internal server error or by application's bug. Please, try again later" HorizontalAlignment="Center"/>
|
||||
<TextBlock x:Uid="/LoadingPage/err" Text="We are unable to display the page" FontSize="48" HorizontalAlignment="Center" TextWrapping="WrapWholeWords" HorizontalTextAlignment="Center"/>
|
||||
<TextBlock x:Uid="/LoadingPage/errDescription" Text="It could be caused by YouTube internal server error or by application's bug. Please, try again later" HorizontalAlignment="Center" HorizontalTextAlignment="Center" TextWrapping="WrapWholeWords"/>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button x:Uid="/LoadingPage/refresh" Name="refresh" Click="wifiRefresh_Click" Content="Refresh page" Margin="5"/>
|
||||
<Button x:Uid="/LoadingPage/feedback" Content="Leave feedback" Background="Red" Foreground="White" Margin="5" Name="feedback" Click="feedback_Click"/>
|
||||
</StackPanel>
|
||||
<TextBlock Name="exception" Foreground="Gray" Text="Exception:" HorizontalAlignment="Center" IsTextSelectionEnabled="True"/>
|
||||
<TextBlock Name="message" Foreground="Gray" Text="Message:" HorizontalAlignment="Center" IsTextSelectionEnabled="True"/>
|
||||
<TextBlock Name="message" Foreground="Gray" Text="Message:" HorizontalAlignment="Center" IsTextSelectionEnabled="True" TextWrapping="WrapWholeWords"/>
|
||||
</StackPanel>
|
||||
|
||||
<FontIcon Name="blockIcon" Visibility="Collapsed" Glyph="" FontSize="100" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Gray"/>
|
||||
|
||||
@@ -406,6 +406,8 @@ namespace FoxTube.Pages
|
||||
mainContent.Children.Remove(pivot);
|
||||
tabsPlaceholder.Children.Add(pivot);
|
||||
|
||||
descriptionPanel.Opacity = 1;
|
||||
descriptionPanel.IsHitTestVisible = true;
|
||||
pivot.Items.RemoveAt(0);
|
||||
mainContent.Children.Add(descriptionPanel);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user