Fix piano control status replay and remove duplicate beeps
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
// Maintainer-controlled web client version.
|
// Maintainer-controlled web client version.
|
||||||
// Format: YYYY.MM.DD Rn (example: 2026.02.20 R2)
|
// Format: YYYY.MM.DD Rn (example: 2026.02.20 R2)
|
||||||
window.CHGRID_WEB_VERSION = "2026.02.22 R207";
|
window.CHGRID_WEB_VERSION = "2026.02.22 R208";
|
||||||
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
|
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
|
||||||
window.CHGRID_TIME_ZONE = "America/Detroit";
|
window.CHGRID_TIME_ZONE = "America/Detroit";
|
||||||
|
|||||||
@@ -1916,7 +1916,9 @@ async function onSignalingMessage(message: IncomingMessage): Promise<void> {
|
|||||||
message.type === 'item_action_result' &&
|
message.type === 'item_action_result' &&
|
||||||
message.ok &&
|
message.ok &&
|
||||||
message.action === 'use' &&
|
message.action === 'use' &&
|
||||||
typeof message.itemId === 'string'
|
typeof message.itemId === 'string' &&
|
||||||
|
typeof message.message === 'string' &&
|
||||||
|
message.message.toLowerCase().includes('begin playing')
|
||||||
) {
|
) {
|
||||||
const item = state.items.get(message.itemId);
|
const item = state.items.get(message.itemId);
|
||||||
if (item?.type === 'piano') {
|
if (item?.type === 'piano') {
|
||||||
@@ -2416,17 +2418,14 @@ function handlePianoUseModeInput(code: string): void {
|
|||||||
}
|
}
|
||||||
if (code === 'KeyZ') {
|
if (code === 'KeyZ') {
|
||||||
signaling.send({ type: 'item_piano_recording', itemId, action: 'toggle_record' });
|
signaling.send({ type: 'item_piano_recording', itemId, action: 'toggle_record' });
|
||||||
audio.sfxUiBlip();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (code === 'KeyX') {
|
if (code === 'KeyX') {
|
||||||
signaling.send({ type: 'item_piano_recording', itemId, action: 'playback' });
|
signaling.send({ type: 'item_piano_recording', itemId, action: 'playback' });
|
||||||
audio.sfxUiBlip();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (code === 'KeyC') {
|
if (code === 'KeyC') {
|
||||||
signaling.send({ type: 'item_piano_recording', itemId, action: 'stop_playback' });
|
signaling.send({ type: 'item_piano_recording', itemId, action: 'stop_playback' });
|
||||||
audio.sfxUiBlip();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (code === 'Equal' || code === 'Minus') {
|
if (code === 'Equal' || code === 'Minus') {
|
||||||
|
|||||||
Reference in New Issue
Block a user