Cursor now hides on playback
Special chars in toasts fixed
This commit is contained in:
@@ -123,7 +123,7 @@ namespace FoxTube.Background
|
|||||||
{
|
{
|
||||||
public static string ConvertEscapeSymbols(this string str)
|
public static string ConvertEscapeSymbols(this string str)
|
||||||
{
|
{
|
||||||
return str.Replace(""", "\"").Replace("'", "'").Replace("<", "<").Replace(">", ">").Replace("&", "&");
|
return str.Replace(""", "\"").Replace("'", "'").Replace("<", "<").Replace(">", ">").Replace("&", "&").Replace(""", "\"").Replace("'", "'").Replace("<", "<").Replace(">", ">").Replace("&", "&");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,12 +7,16 @@
|
|||||||
- Fixed ads appearance
|
- Fixed ads appearance
|
||||||
- Fixed ads watermarks on video when it was opened through notification
|
- Fixed ads watermarks on video when it was opened through notification
|
||||||
- Fixed videos loading
|
- Fixed videos loading
|
||||||
|
- Fixed special characters appearing in toast notifications
|
||||||
|
- Cursor now hides on playback
|
||||||
</en-US>
|
</en-US>
|
||||||
<ru-RU>### Что нового:
|
<ru-RU>### Что нового:
|
||||||
- Исправлена проблема получения истории, "Посмотреть позже" и рекомендаций
|
- Исправлена проблема получения истории, "Посмотреть позже" и рекомендаций
|
||||||
- Исправлен внешний вид рекламы
|
- Исправлен внешний вид рекламы
|
||||||
- Исправлено появление водяных занков рекламы на видео при открытии через уведомления
|
- Исправлено появление водяных занков рекламы на видео при открытии через уведомления
|
||||||
- Исправлена загрузка видео
|
- Исправлена загрузка видео
|
||||||
|
- Исправлено появление особых символов в уведомлениях
|
||||||
|
- Теперь курсор скрывается при просмотре
|
||||||
</ru-RU>
|
</ru-RU>
|
||||||
</content>
|
</content>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ namespace FoxTube
|
|||||||
};
|
};
|
||||||
public static YouTubeService Service => IsAuthorized ? new YouTubeService(Initializer) : NoAuthService;
|
public static YouTubeService Service => IsAuthorized ? new YouTubeService(Initializer) : NoAuthService;
|
||||||
public static HttpClient HttpClient { get; } = new HttpClient();
|
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 AppId => TestAds ? "d25517cb-12d4-4699-8bdc-52040c712cab" : "9ncqqxjtdlfh";
|
||||||
public static string AdUnitId => TestAds ? "test" : "1100044398";
|
public static string AdUnitId => TestAds ? "test" : "1100044398";
|
||||||
public static bool AdsDisabled { get; private set; } = true;
|
public static bool AdsDisabled { get; private set; } = true;
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="1080"
|
d:DesignHeight="1080"
|
||||||
d:DesignWidth="1920"
|
d:DesignWidth="1920"
|
||||||
RequestedTheme="Dark">
|
RequestedTheme="Dark"
|
||||||
|
PointerMoved="UserControl_PointerMoved">
|
||||||
|
|
||||||
<Grid Background="White" Name="grid">
|
<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">
|
<MediaElement Name="videoSource" MarkerReached="VideoSource_MarkerReached" AreTransportControlsEnabled="True" PosterSource="ms-appx:///Assets/videoThumbSample.png" CurrentStateChanged="VideoSource_CurrentStateChanged" MediaOpened="VideoSource_MediaOpened" VolumeChanged="VideoSource_VolumeChanged">
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ using Windows.Storage.Streams;
|
|||||||
using YoutubeExplode.Models.MediaStreams;
|
using YoutubeExplode.Models.MediaStreams;
|
||||||
using YoutubeExplode;
|
using YoutubeExplode;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using Windows.Media.Playback;
|
using Windows.Foundation;
|
||||||
using Windows.Media.Core;
|
|
||||||
|
|
||||||
namespace FoxTube
|
namespace FoxTube
|
||||||
{
|
{
|
||||||
@@ -30,6 +29,8 @@ namespace FoxTube
|
|||||||
bool isMuxed = false;
|
bool isMuxed = false;
|
||||||
DispatcherTimer muxedTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(100) };
|
DispatcherTimer muxedTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(100) };
|
||||||
|
|
||||||
|
DispatcherTimer cursorTimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(5) };
|
||||||
|
|
||||||
TimeSpan timecodeBackup;
|
TimeSpan timecodeBackup;
|
||||||
bool needUpdateTimecode = false;
|
bool needUpdateTimecode = false;
|
||||||
|
|
||||||
@@ -62,6 +63,7 @@ namespace FoxTube
|
|||||||
Controls.IsSkipBackwardButtonVisible = false;
|
Controls.IsSkipBackwardButtonVisible = false;
|
||||||
Controls.IsSkipForwardButtonVisible = false;
|
Controls.IsSkipForwardButtonVisible = false;
|
||||||
Controls.LiveRequested += Controls_LiveRequested;
|
Controls.LiveRequested += Controls_LiveRequested;
|
||||||
|
object i = await new YoutubeClient().GetVideoMediaStreamInfosAsync(item.Id);
|
||||||
Controls.SetStream((await new YoutubeClient().GetVideoMediaStreamInfosAsync(item.Id)).HlsLiveStreamUrl);
|
Controls.SetStream((await new YoutubeClient().GetVideoMediaStreamInfosAsync(item.Id)).HlsLiveStreamUrl);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -89,6 +91,19 @@ namespace FoxTube
|
|||||||
audioSource.Position = videoSource.Position;
|
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.CloseRequested += Controls_CloseRequested;
|
||||||
Controls.NextRequested += (s, e) => NextClicked?.Invoke();
|
Controls.NextRequested += (s, e) => NextClicked?.Invoke();
|
||||||
Controls.QualityChanged += Controls_QualityChanged;
|
Controls.QualityChanged += Controls_QualityChanged;
|
||||||
@@ -254,5 +269,12 @@ namespace FoxTube
|
|||||||
{
|
{
|
||||||
Controls.Advert.PushAdvert();
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -450,7 +450,7 @@
|
|||||||
<Version>4.3.2</Version>
|
<Version>4.3.2</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="YoutubeExplode">
|
<PackageReference Include="YoutubeExplode">
|
||||||
<Version>4.7.0-alpha</Version>
|
<Version>4.7.0-beta</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user