gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitd56e5054d56e5054Sync theme and shared tokens from layouts 17e0f03mred56e5054/reports/JB3b-keyboard-gap.md

1.7 KB

  1. # Hybriel gap: a keydown handler in the parent makes the child's audio element load its source again
  2. Where: components/main.hl of the jukebox (the shell); it composes MediaPlayer (components/media-player) with `src = nowSrc`. A song is playing (currentTime about 3 s).
  3. What happens: any keydown that reaches a handler written in the shell makes the audio element fire emptied, loadstart and, because autoPlay is 'true', play again: the song restarts at 0.
  4. It does not matter where the handler sits (`document.addEventListener('keydown', (k) => ...)` inside a mount handler, `on keydown(e)` on body, `on keydown(e)` on the app div), whether it emits the key event or a plain string, or whether the handler does anything: `emit jbKey('none')` with a handler that only returns null is enough.
  5. Clicks, pointer events and a timer's `emit jbTick()` in the same shell do not do it. Without any keydown listener a key press changes nothing.
  6. Measured with CDP (listeners for emptied, loadstart, play, pause, seeking on the audio element; Input.dispatchKeyEvent for the key x): [emptied, loadstart, play] after one key.
  7. Probably the shell re-applies the child's `src` prop after a keydown handler although nothing changed (setting the src attribute again loads the element again).
  8. To reproduce in the jukebox: add to the View of components/main.hl `body { on keydown(e) { emit jbKey(e) } ... }` and `on jbKey(e) { return null }`, start a song, press any key.
  9. The keyboard code that was tried: actions space (play / pause), ArrowLeft / ArrowRight (10 s), n (next), p (previous), Escape (close the overlay), ignored in input, textarea and select fields.
  10. Next step for a fresh worker: build the minimal repro app (a parent with an audio-playing child and an `on keydown(e)` that returns) and report it to hybriel.

Branches

Latest commits

  • d56e5054Sync theme and shared tokens from layouts 17e0f03mre
  • b1362547Re-vendor to Hybriel set day35mre
  • 89e10f08Records: mission 002 rollback wordingmre
  • 9485dee7Records: mission 002 brief (live step)mre
  • 9ba68fe7Records: S1b reviewedmre
  • 193dfff1Records: S1 result, S1b startedmre
  • 028ed776Records: mission 001 continuation S1bmre
  • 1838d7e8Records: S1 startedmre
  • a43fca3fRecords: mission 001 decided pointsmre
  • 41773828Records: statusmre
  • a82c0805Records: mission 001 brief (Style form)mre
  • a4bce6d1Records: ticket push subscriptionmre
  • 14abde3bjukebox: records: Atlas's records moved to worldapi-conductor/archivemre
  • 0433e9a8jukebox: records: gitoria remote added and pushedmre
  • 1722d707jukebox: records: repo creation handed to Gitoriamre
  • b42e7dfbjukebox: conductor records (CONDUCTOR.md, STATUS.md), old STATUS archivedmre
  • 1b0d0bc1jukebox: a startup error prints its message before exit 1 (hybriel#247)mre
  • b19c478bjukebox JB18 (jukebox#17): onto Hybriel set-day31 (b287cd82, contains the SIGPIPE fix 6d2ca454): plugins/core and plugins/web re-vendored, bin/ from the set; a client that closes /stream while it is written no longer kills the server (90 aborted streams survived, the old bin died with exit 141 on the first)mre
  • 73867a2ejukebox#2: Style blocks in the language's nested form (rules named after the View's own elements, pseudo-classes nested, merged duplicates); the same CSS rules, the pages look the samemre
  • 06c548d6jukebox JB15: report, log linemre