Fix for web remote volume buttons being stuck when a Roku stick is used with Roku TV
This commit is contained in:
1 parent
59e378cc9c
commit
f7b8aa6c29
2 files changed
+27
-4
No files matched your search
@@ -5,6 +5,7 @@
|
||||
export let key: string;
|
||||
export let icon;
|
||||
export let small: boolean = false;
|
||||
export let singlePressEvent: boolean = false;
|
||||
|
||||
let button;
|
||||
|
||||
@@ -37,11 +38,18 @@
|
||||
let isDown = false;
|
||||
function pressKeyDown() {
|
||||
isDown = true;
|
||||
ExternalControlProtocol.pressKeyDown(key);
|
||||
if (singlePressEvent) {
|
||||
ExternalControlProtocol.pressKey(key);
|
||||
} else {
|
||||
ExternalControlProtocol.pressKeyDown(key);
|
||||
}
|
||||
}
|
||||
|
||||
function pressKeyUp() {
|
||||
isDown = false;
|
||||
if (singlePressEvent) {
|
||||
return;
|
||||
}
|
||||
ExternalControlProtocol.pressKeyUp(key);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user