From 336ba9ed198620d8c5b9b6e3b4db783de61d5e51 Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Sun, 19 Feb 2023 00:15:20 +0300 Subject: [PATCH] Fix PlayPause button Disable on-screen playback control, if available on the page. --- tizen.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tizen.js b/tizen.js index 9446fb8..51c85dd 100644 --- a/tizen.js +++ b/tizen.js @@ -188,4 +188,15 @@ tizen.tvinputdevice.registerKey('MediaRewind'); tizen.tvinputdevice.registerKey('MediaFastForward'); }); + + function updateKeys() { + if (location.hash.indexOf('/queue') !== -1 || location.hash.indexOf('/video') !== -1) { + // Disable on-screen playback control, if available on the page + tizen.tvinputdevice.registerKey('MediaPlayPause'); + } else { + tizen.tvinputdevice.unregisterKey('MediaPlayPause'); + } + } + + window.addEventListener('viewshow', updateKeys); })();