Archived
1
0

Cursor now hides on playback

Special chars in toasts fixed
This commit is contained in:
Michael Gordeev
2019-04-25 21:17:28 +03:00
parent af0747d6e5
commit 60bb51e272
6 changed files with 33 additions and 6 deletions
+4
View File
@@ -7,12 +7,16 @@
- Fixed ads appearance
- Fixed ads watermarks on video when it was opened through notification
- Fixed videos loading
- Fixed special characters appearing in toast notifications
- Cursor now hides on playback
</en-US>
<ru-RU>### Что нового:
- Исправлена проблема получения истории, "Посмотреть позже" и рекомендаций
- Исправлен внешний вид рекламы
- Исправлено появление водяных занков рекламы на видео при открытии через уведомления
- Исправлена загрузка видео
- Исправлено появление особых символов в уведомлениях
- Теперь курсор скрывается при просмотре
</ru-RU>
</content>
</item>
+1 -1
View File
@@ -42,7 +42,7 @@ namespace FoxTube
};
public static YouTubeService Service => IsAuthorized ? new YouTubeService(Initializer) : NoAuthService;
public static HttpClient HttpClient { get; } = new HttpClient();
private static bool TestAds => true; //Change this bool
private static bool TestAds => false; //Change this bool
public static string AppId => TestAds ? "d25517cb-12d4-4699-8bdc-52040c712cab" : "9ncqqxjtdlfh";
public static string AdUnitId => TestAds ? "test" : "1100044398";
public static bool AdsDisabled { get; private set; } = true;
+2 -1
View File
@@ -8,7 +8,8 @@
mc:Ignorable="d"
d:DesignHeight="1080"
d:DesignWidth="1920"
RequestedTheme="Dark">
RequestedTheme="Dark"
PointerMoved="UserControl_PointerMoved">
<Grid Background="White" Name="grid">
<MediaElement Name="videoSource" MarkerReached="VideoSource_MarkerReached" AreTransportControlsEnabled="True" PosterSource="ms-appx:///Assets/videoThumbSample.png" CurrentStateChanged="VideoSource_CurrentStateChanged" MediaOpened="VideoSource_MediaOpened" VolumeChanged="VideoSource_VolumeChanged">
+24 -2
View File
@@ -10,8 +10,7 @@ using Windows.Storage.Streams;
using YoutubeExplode.Models.MediaStreams;
using YoutubeExplode;
using System.Diagnostics;
using Windows.Media.Playback;
using Windows.Media.Core;
using Windows.Foundation;
namespace FoxTube
{
@@ -30,6 +29,8 @@ namespace FoxTube
bool isMuxed = false;
DispatcherTimer muxedTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(100) };
DispatcherTimer cursorTimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(5) };
TimeSpan timecodeBackup;
bool needUpdateTimecode = false;
@@ -62,6 +63,7 @@ namespace FoxTube
Controls.IsSkipBackwardButtonVisible = false;
Controls.IsSkipForwardButtonVisible = false;
Controls.LiveRequested += Controls_LiveRequested;
object i = await new YoutubeClient().GetVideoMediaStreamInfosAsync(item.Id);
Controls.SetStream((await new YoutubeClient().GetVideoMediaStreamInfosAsync(item.Id)).HlsLiveStreamUrl);
}
else
@@ -89,6 +91,19 @@ namespace FoxTube
audioSource.Position = videoSource.Position;
};
cursorTimer.Tick += (s, e) =>
{
Point cursorPoint = CoreWindow.GetForCurrentThread().PointerPosition;
cursorPoint.X -= Window.Current.Bounds.X;
cursorPoint.Y -= Window.Current.Bounds.Y;
Rect playerBounds = TransformToVisual(Methods.MainPage).TransformBounds(new Rect(0, 0, ActualWidth, ActualHeight));
if(cursorPoint.Y > playerBounds.Top && cursorPoint.Y < playerBounds.Bottom &&
cursorPoint.X > playerBounds.Left && cursorPoint.X < playerBounds.Right)
CoreWindow.GetForCurrentThread().PointerCursor = null;
cursorTimer.Stop();
};
Controls.CloseRequested += Controls_CloseRequested;
Controls.NextRequested += (s, e) => NextClicked?.Invoke();
Controls.QualityChanged += Controls_QualityChanged;
@@ -254,5 +269,12 @@ namespace FoxTube
{
Controls.Advert.PushAdvert();
}
private void UserControl_PointerMoved(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
if (CoreWindow.GetForCurrentThread().PointerCursor == null)
CoreWindow.GetForCurrentThread().PointerCursor = new CoreCursor(CoreCursorType.Arrow, 0);
cursorTimer.Start();
}
}
}
+1 -1
View File
@@ -450,7 +450,7 @@
<Version>4.3.2</Version>
</PackageReference>
<PackageReference Include="YoutubeExplode">
<Version>4.7.0-alpha</Version>
<Version>4.7.0-beta</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>