Merge pull request #184 from dmitrylyzo/fix-playpause

Fix PlayPause button
This commit is contained in:
Dmitry Lyzo 2023-02-20 00:14:54 +03:00 committed by GitHub
commit a8629f095d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
})();