diff --git a/FoxTube/Assets/Data/Patchnotes.xml b/FoxTube/Assets/Data/Patchnotes.xml index 39a4840..f12ec2f 100644 --- a/FoxTube/Assets/Data/Patchnotes.xml +++ b/FoxTube/Assets/Data/Patchnotes.xml @@ -1,8 +1,8 @@  - + - ##[Patch #1] + ##[Final release] ### What's new: - In-video advert now doesn't appear on minimized playback - Fixed small header appearing on channel page @@ -12,8 +12,16 @@ - Added backward navigation to video page - Improved authentication process - Removed outdated logo from 'About' page and updated Twitter link +- Play/pause toggle on video player mouse click +- Added player hotkeys: + Space - Play/Pause + Arrow right/left - Skip forward/backward + F11 - Toggle full screen +- Activated real ads +- Fixed app crash on video's zero rating +- "Subscribe" button now is hidden on your videos - ##[Патч #1] + ##[Релизная версия] ### Что нового: - Теперь реклама в видео не появляется в компактном режиме - Исправлено появление меленького заголовка на странице канала @@ -23,6 +31,14 @@ - Добавлена обратная навигация для страниц просмотра - Улучшен процесс аутентификации - Удален старый логотип с страницы 'О приложении' и обновлена ссылка на Твиттер +- Пауза/воспроизведение при клике мышью по окну плеера +- Добавлены горячие клавиши: + Пробел - Пауза/Воспроизведение + Стрелка вправо/влево - Перейти вперед на 30 секунд/назад на 10 секунд + F11 - Переключить полноэкранный режим +- Запущена реальная реклама +- Исправлен вылет приложения при нулевом рейтинге видео +- Кнопка "Подписаться" теперь скрыта на странице вашего видео diff --git a/FoxTube/Classes/InboxItem.cs b/FoxTube/Classes/InboxItem.cs index f73a0e3..6ea8f09 100644 --- a/FoxTube/Classes/InboxItem.cs +++ b/FoxTube/Classes/InboxItem.cs @@ -67,10 +67,10 @@ namespace FoxTube.Classes Id = version; } - public InboxItem(string title, string content, DateTime timeStamp, string id) + public InboxItem(string title, string content, DateTime timeStamp, string id, string header) { Type = InboxItemType.Default; - Content = content; + Content = header + "\n\n" + content; Subject = title; TimeStamp = timeStamp; Id = id; diff --git a/FoxTube/Classes/SecretsVault.cs b/FoxTube/Classes/SecretsVault.cs index 5df4f04..2a9686b 100644 --- a/FoxTube/Classes/SecretsVault.cs +++ b/FoxTube/Classes/SecretsVault.cs @@ -44,7 +44,7 @@ namespace FoxTube public static YouTubeService Service => IsAuthorized ? new YouTubeService(Initializer) : NoAuthService; public static HttpClient HttpClient { get; } = new HttpClient(); - private static bool TestAds => true; //TODO: Change this bool + private static bool TestAds => false; //TODO: 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; diff --git a/FoxTube/Controls/Player/PlayerControls.cs b/FoxTube/Controls/Player/PlayerControls.cs index a215663..ae6e295 100644 --- a/FoxTube/Controls/Player/PlayerControls.cs +++ b/FoxTube/Controls/Player/PlayerControls.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using Windows.ApplicationModel.Resources; +using Windows.Foundation; using Windows.Graphics.Display; using Windows.Media.Core; using Windows.UI.Xaml; @@ -69,8 +70,6 @@ namespace FoxTube Button fwd; Button bwd; Button captionsMenu; - Button settingsMenu; - Button fullscreen; Button drag; TextBlock title; @@ -94,6 +93,7 @@ namespace FoxTube Grid header; Grid footer; Grid center; + Grid centerTrigger; #endregion PlayerDisplayState State { get; set; } = PlayerDisplayState.Normal; @@ -137,6 +137,20 @@ namespace FoxTube quality.SelectionChanged += Quality_SelectionChanged; seek.ValueChanged += Seek_ValueChanged; + Player.Tapped += (s, e) => + { + Rect view = new Rect(0, 0, centerTrigger.ActualWidth, centerTrigger.ActualHeight); + Point p = e.GetPosition(centerTrigger); + + if (!view.Contains(p) || e.PointerDeviceType != Windows.Devices.Input.PointerDeviceType.Mouse) + return; + + if (Player.CurrentState == Windows.UI.Xaml.Media.MediaElementState.Playing) + Player.Pause(); + else if (Player.CurrentState == Windows.UI.Xaml.Media.MediaElementState.Paused) + Player.Play(); + }; + if (queue.Count > 0) foreach (Action i in queue) i(); @@ -157,8 +171,6 @@ namespace FoxTube fwd = GetTemplateChild("SkipForwardButton") as Button; bwd = GetTemplateChild("SkipBackwardButton") as Button; captionsMenu = GetTemplateChild("CaptionsMenuButton") as Button; - settingsMenu = GetTemplateChild("QualityMenuButton") as Button; - fullscreen = GetTemplateChild("FullWindowButton") as Button; drag = GetTemplateChild("drag") as Button; Advert = GetTemplateChild("AdvertControl") as PlayerAdvert; @@ -184,6 +196,7 @@ namespace FoxTube header = GetTemplateChild("header") as Grid; footer = GetTemplateChild("footer") as Grid; center = GetTemplateChild("center") as Grid; + centerTrigger = GetTemplateChild("centerTrigger") as Grid; } private void Seek_ValueChanged(object sender, RangeBaseValueChangedEventArgs e) @@ -498,6 +511,8 @@ namespace FoxTube else quality.SelectedIndex = 0; } + + Focus(FocusState.Programmatic); } public void PushAdvert() diff --git a/FoxTube/FoxTube.csproj b/FoxTube/FoxTube.csproj index 761623b..c71604d 100644 --- a/FoxTube/FoxTube.csproj +++ b/FoxTube/FoxTube.csproj @@ -20,7 +20,7 @@ FoxTube_StoreKey.pfx 50B93E6A246058D555BA65CD203D7A02064A7409 False - True + False E:\XFox\Documents\FoxTube builds\0.6\ Always x86|x64|arm diff --git a/FoxTube/Package.appxmanifest b/FoxTube/Package.appxmanifest index c4ea68e..feeae81 100644 --- a/FoxTube/Package.appxmanifest +++ b/FoxTube/Package.appxmanifest @@ -1,6 +1,6 @@  - + FoxTube diff --git a/FoxTube/Pages/SettingsPages/About.xaml b/FoxTube/Pages/SettingsPages/About.xaml index 0f7471f..2192504 100644 --- a/FoxTube/Pages/SettingsPages/About.xaml +++ b/FoxTube/Pages/SettingsPages/About.xaml @@ -12,6 +12,11 @@ + + + @Tyrrrz for his awesome library + @msreviewnet for warm welcome and first feedback + diff --git a/FoxTube/Pages/SettingsPages/Inbox.xaml b/FoxTube/Pages/SettingsPages/Inbox.xaml index 6f79c90..980196a 100644 --- a/FoxTube/Pages/SettingsPages/Inbox.xaml +++ b/FoxTube/Pages/SettingsPages/Inbox.xaml @@ -94,7 +94,7 @@ - + +