From f89e9f59ca124200dcea78ba7f2c6e48c82d405e Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Wed, 12 Jun 2024 17:05:29 -0400 Subject: [PATCH] Fixed an issue where pause/play would not work with picture-in-picture --- CHANGELOG.md | 4 +++- playlet-lib/src/components/ChannelView/ChannelView.bs | 1 + playlet-lib/src/components/PlaylistView/PlaylistView.bs | 1 + playlet-lib/src/components/ProfileView/ProfileView.bs | 4 ++-- .../Screens/SearchScreen/SearchFilters/SearchFilters.bs | 4 ++-- .../SettingsScreen/HomeScreenEditor/HomeScreenEditor.bs | 4 ++-- .../InvidiousInstance/InvidiousInstanceSettings.bs | 4 ++-- .../InvidiousInstanceTesting/InvidiousInstanceTesting.bs | 4 ++-- 8 files changed, 15 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5616bba..c80629aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -- Nothing worth mentioning yet. +### Fixed + +- An issue where pause/play would not work with picture-in-picture on certain views ## [0.24.1] - 2024-06-09 diff --git a/playlet-lib/src/components/ChannelView/ChannelView.bs b/playlet-lib/src/components/ChannelView/ChannelView.bs index 36a07c0d..80abc62f 100644 --- a/playlet-lib/src/components/ChannelView/ChannelView.bs +++ b/playlet-lib/src/components/ChannelView/ChannelView.bs @@ -117,6 +117,7 @@ function OnkeyEvent(key as string, press as boolean) as boolean Close() return true end if + return false end function diff --git a/playlet-lib/src/components/PlaylistView/PlaylistView.bs b/playlet-lib/src/components/PlaylistView/PlaylistView.bs index 01b2d35f..0d844bbb 100644 --- a/playlet-lib/src/components/PlaylistView/PlaylistView.bs +++ b/playlet-lib/src/components/PlaylistView/PlaylistView.bs @@ -84,6 +84,7 @@ function OnkeyEvent(key as string, press as boolean) as boolean Close() return true end if + return false end function diff --git a/playlet-lib/src/components/ProfileView/ProfileView.bs b/playlet-lib/src/components/ProfileView/ProfileView.bs index 9845a3af..dbac6eef 100644 --- a/playlet-lib/src/components/ProfileView/ProfileView.bs +++ b/playlet-lib/src/components/ProfileView/ProfileView.bs @@ -62,8 +62,8 @@ function OnkeyEvent(key as string, press as boolean) as boolean return true end if - if key = "options" - ' A pass-through to the app controller, so it can toggle picture-in-picture + if key = "options" or key = "play" or key = "pause" or key = "playonly" + ' A pass-through to the app controller, so it can toggle picture-in-picture and pause/play return false end if diff --git a/playlet-lib/src/components/Screens/SearchScreen/SearchFilters/SearchFilters.bs b/playlet-lib/src/components/Screens/SearchScreen/SearchFilters/SearchFilters.bs index d12a04d5..6c7c3271 100644 --- a/playlet-lib/src/components/Screens/SearchScreen/SearchFilters/SearchFilters.bs +++ b/playlet-lib/src/components/Screens/SearchScreen/SearchFilters/SearchFilters.bs @@ -250,8 +250,8 @@ function OnkeyEvent(key as string, press as boolean) as boolean return true end if - if key = "options" - ' A pass-through to the app controller, so it can toggle picture-in-picture + if key = "options" or key = "play" or key = "pause" or key = "playonly" + ' A pass-through to the app controller, so it can toggle picture-in-picture and pause/play return false end if diff --git a/playlet-lib/src/components/Screens/SettingsScreen/HomeScreenEditor/HomeScreenEditor.bs b/playlet-lib/src/components/Screens/SettingsScreen/HomeScreenEditor/HomeScreenEditor.bs index f744c7e1..49eaa290 100644 --- a/playlet-lib/src/components/Screens/SettingsScreen/HomeScreenEditor/HomeScreenEditor.bs +++ b/playlet-lib/src/components/Screens/SettingsScreen/HomeScreenEditor/HomeScreenEditor.bs @@ -60,8 +60,8 @@ function OnkeyEvent(key as string, press as boolean) as boolean return true end if - if key = "options" - ' A pass-through to the app controller, so it can toggle picture-in-picture + if key = "options" or key = "play" or key = "pause" or key = "playonly" + ' A pass-through to the app controller, so it can toggle picture-in-picture and pause/play return false end if diff --git a/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceSettings.bs b/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceSettings.bs index 71b39acd..bc7efaeb 100644 --- a/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceSettings.bs +++ b/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceSettings.bs @@ -72,8 +72,8 @@ function OnkeyEvent(key as string, press as boolean) as boolean return true end if - if key = "options" - ' A pass-through to the app controller, so it can toggle picture-in-picture + if key = "options" or key = "play" or key = "pause" or key = "playonly" + ' A pass-through to the app controller, so it can toggle picture-in-picture and pause/play return false end if diff --git a/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTesting.bs b/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTesting.bs index f147e422..7656d921 100644 --- a/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTesting.bs +++ b/playlet-lib/src/components/Screens/SettingsScreen/InvidiousInstance/InvidiousInstanceTesting/InvidiousInstanceTesting.bs @@ -31,8 +31,8 @@ function OnkeyEvent(key as string, press as boolean) as boolean return true end if - if key = "options" - ' A pass-through to the app controller, so it can toggle picture-in-picture + if key = "options" or key = "play" or key = "pause" or key = "playonly" + ' A pass-through to the app controller, so it can toggle picture-in-picture and pause/play return false end if