1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Backport pull request #4274 from jellyfin/release-10.8.z

Fix back action on Hisense TV

Original-merge: 0ff86d9ea0

Merged-by: Joshua M. Boniface <joshua@boniface.me>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
Dmitry Lyzo 2023-01-22 14:08:05 -05:00 committed by Joshua M. Boniface
parent 4ee51ff12e
commit 0eb393dc4b
2 changed files with 12 additions and 0 deletions

View file

@ -282,7 +282,9 @@ if (userAgent.toLowerCase().indexOf('xbox') !== -1) {
browser.tv = true; browser.tv = true;
} }
browser.animate = typeof document !== 'undefined' && document.documentElement.animate != null; browser.animate = typeof document !== 'undefined' && document.documentElement.animate != null;
browser.hisense = userAgent.toLowerCase().includes('hisense');
browser.tizen = userAgent.toLowerCase().indexOf('tizen') !== -1 || window.tizen != null; browser.tizen = userAgent.toLowerCase().indexOf('tizen') !== -1 || window.tizen != null;
browser.vidaa = userAgent.toLowerCase().includes('vidaa');
browser.web0s = isWeb0s(); browser.web0s = isWeb0s();
browser.edgeUwp = browser.edge && (userAgent.toLowerCase().indexOf('msapphost') !== -1 || userAgent.toLowerCase().indexOf('webview') !== -1); browser.edgeUwp = browser.edge && (userAgent.toLowerCase().indexOf('msapphost') !== -1 || userAgent.toLowerCase().indexOf('webview') !== -1);

View file

@ -3,6 +3,7 @@
* @module components/input/keyboardnavigation * @module components/input/keyboardnavigation
*/ */
import browser from './browser';
import inputManager from './inputManager'; import inputManager from './inputManager';
import layoutManager from '../components/layoutManager'; import layoutManager from '../components/layoutManager';
import appSettings from './settings/appSettings'; import appSettings from './settings/appSettings';
@ -120,6 +121,15 @@ export function enable() {
inputManager.handleCommand('back'); inputManager.handleCommand('back');
break; break;
// HACK: Hisense TV (VIDAA OS) uses Backspace for Back action
case 'Backspace':
if (browser.tv && browser.hisense && browser.vidaa) {
inputManager.handleCommand('back');
} else {
capture = false;
}
break;
case 'Escape': case 'Escape':
if (layoutManager.tv) { if (layoutManager.tv) {
inputManager.handleCommand('back'); inputManager.handleCommand('back');