mirror of
https://gitlab.com/vyla-entertainment/TV.git
synced 2026-11-20 15:05:38 -05:00
ported sdk and this works
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
if (window.tizen && window.tizen.tvinputdevice) {
|
||||
try {
|
||||
['MediaPlay', 'MediaPause', 'MediaPlayPause', 'MediaStop', 'MediaFastForward', 'MediaRewind', '10009']
|
||||
.forEach(k => tizen.tvinputdevice.registerKey(k));
|
||||
} catch (_) { }
|
||||
}
|
||||
|
||||
const KM = {
|
||||
37: 'l', 21: 'l',
|
||||
38: 'u', 19: 'u',
|
||||
@@ -96,4 +103,10 @@ document.addEventListener('mousemove', e => {
|
||||
document.addEventListener('click', e => {
|
||||
const f = e.target.closest('.f'); if (f) act(f)
|
||||
});
|
||||
ov.addEventListener('wheel', () => { }, { passive: true });
|
||||
ov.addEventListener('wheel', () => { }, { passive: true });
|
||||
|
||||
window.vylaBack = () => {
|
||||
const open = [pl, ov, lib, sr].some(e => e.classList.contains('show'));
|
||||
if (open) document.dispatchEvent(new KeyboardEvent('keydown', { keyCode: 4, key: 'GoBack', bubbles: true, cancelable: true }));
|
||||
return open;
|
||||
};
|
||||
Reference in New Issue
Block a user