Fix PlayPause button

Disable on-screen playback control, if available on the page.
This commit is contained in:
Dmitry Lyzo 2023-02-19 00:15:20 +03:00
parent a56950ddb6
commit 336ba9ed19

View File

@ -188,4 +188,15 @@
tizen.tvinputdevice.registerKey('MediaRewind'); tizen.tvinputdevice.registerKey('MediaRewind');
tizen.tvinputdevice.registerKey('MediaFastForward'); 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);
})(); })();