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
+26
-3
No files matched your search
@@ -5,6 +5,7 @@
|
|||||||
export let key: string;
|
export let key: string;
|
||||||
export let icon;
|
export let icon;
|
||||||
export let small: boolean = false;
|
export let small: boolean = false;
|
||||||
|
export let singlePressEvent: boolean = false;
|
||||||
|
|
||||||
let button;
|
let button;
|
||||||
|
|
||||||
@@ -37,11 +38,18 @@
|
|||||||
let isDown = false;
|
let isDown = false;
|
||||||
function pressKeyDown() {
|
function pressKeyDown() {
|
||||||
isDown = true;
|
isDown = true;
|
||||||
|
if (singlePressEvent) {
|
||||||
|
ExternalControlProtocol.pressKey(key);
|
||||||
|
} else {
|
||||||
ExternalControlProtocol.pressKeyDown(key);
|
ExternalControlProtocol.pressKeyDown(key);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function pressKeyUp() {
|
function pressKeyUp() {
|
||||||
isDown = false;
|
isDown = false;
|
||||||
|
if (singlePressEvent) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
ExternalControlProtocol.pressKeyUp(key);
|
ExternalControlProtocol.pressKeyUp(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -153,9 +153,24 @@ And set it to "Enabled".`;
|
|||||||
<RemoteButton key={BUTTONS.fwd} icon={FastForwardIcon} small />
|
<RemoteButton key={BUTTONS.fwd} icon={FastForwardIcon} small />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex space-x-2 m-1">
|
<div class="flex space-x-2 m-1">
|
||||||
<RemoteButton key={BUTTONS.volumeMute} icon={VolumeMuteIcon} small />
|
<RemoteButton
|
||||||
<RemoteButton key={BUTTONS.volumeDown} icon={VolumeDownIcon} small />
|
key={BUTTONS.volumeMute}
|
||||||
<RemoteButton key={BUTTONS.volumeUp} icon={VolumeUpIcon} small />
|
icon={VolumeMuteIcon}
|
||||||
|
small
|
||||||
|
singlePressEvent
|
||||||
|
/>
|
||||||
|
<RemoteButton
|
||||||
|
key={BUTTONS.volumeDown}
|
||||||
|
icon={VolumeDownIcon}
|
||||||
|
small
|
||||||
|
singlePressEvent
|
||||||
|
/>
|
||||||
|
<RemoteButton
|
||||||
|
key={BUTTONS.volumeUp}
|
||||||
|
icon={VolumeUpIcon}
|
||||||
|
small
|
||||||
|
singlePressEvent
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
on:click={showRemoteNotWorkingDialog}
|
on:click={showRemoteNotWorkingDialog}
|
||||||
|
|||||||
Reference in new issue
Block a user