Fix emit replay looping and add PgUp/PgDn option stepping
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user