Fix emit replay looping and add PgUp/PgDn option stepping

This commit is contained in:
Jage9
2026-02-28 02:38:26 -05:00
parent 887aad9435
commit 932ab68be5
4 changed files with 19 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
// Maintainer-controlled web client version.
// Format: YYYY.MM.DD Rn (example: 2026.02.20 R2)
window.CHGRID_WEB_VERSION = "2026.02.28 R303";
window.CHGRID_WEB_VERSION = "2026.02.28 R304";
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
window.CHGRID_TIME_ZONE = "America/Detroit";

View File

@@ -311,6 +311,13 @@ export class ItemEmitRuntime {
// Ignore stale media reload failures.
}
}
if (element.ended || (Number.isFinite(element.duration) && element.duration > 0 && element.currentTime >= element.duration - 0.01)) {
try {
element.currentTime = 0;
} catch {
// Ignore reset failures for streams/seeking-restricted media.
}
}
void element
.play()
.then(() => {

View File

@@ -353,6 +353,16 @@ export function createItemPropertyEditor(deps: EditorDeps): {
return;
}
if (code === 'PageUp' || code === 'PageDown') {
const length = deps.state.itemPropertyOptionValues.length;
const delta = code === 'PageUp' ? -10 : 10;
const nextIndex = (deps.state.itemPropertyOptionIndex + delta + length * 1000) % length;
deps.state.itemPropertyOptionIndex = nextIndex;
deps.updateStatus(deps.state.itemPropertyOptionValues[nextIndex]);
deps.sfxUiBlip();
return;
}
const control = handleListControlKey(
code,
key,

View File

@@ -74,6 +74,7 @@ This document is the authoritative keymap for the client.
Applies to effect select, user/item list modes, item selection, item property list, and property option select.
- `ArrowUp` / `ArrowDown`: Move selection
- `PageUp` / `PageDown` in item property option select: Jump 10 options backward/forward
- `ArrowLeft` / `ArrowRight` in user list: Lower/raise selected user listen volume (`0.5..4.0`)
- `Enter`: Confirm selection
- `Escape`: Exit/cancel