Skip to content

Interactive transcript export: pre-fill the media reference from a local file's real name - #427

Merged
maboa merged 1 commit into
mainfrom
fix/interactive-export-prefill-filename
Jul 28, 2026
Merged

Interactive transcript export: pre-fill the media reference from a local file's real name#427
maboa merged 1 commit into
mainfrom
fix/interactive-export-prefill-filename

Conversation

@maboa

@maboa maboa commented Jul 28, 2026

Copy link
Copy Markdown
Member

Fixes #426.

Problem

Exporting an interactive transcript of a local media file links the media by a blob: URL with no usable path, so the export modal's "Media file or URL" field started empty and the user had to type the reference by hand. Whatever was last typed also persisted across opens, so a throwaway value (e.g. test) could silently end up in the exported page's <video src="…">.

Change

  • Capture the real filename of a locally-loaded media file — centrally, via a single capture-phase change listener over any media file input. Import inputs (JSON/SRT/VTT) are excluded by a media-type check, so it's modular and future-proof (no per-engine edits).
  • Pre-fill the modal field from guessMediaSrc for local files, the way remote URLs already fill from the player src.
  • Stale-clear: loading new media clears the field, so a name typed for a previous clip can't linger and be exported by mistake.

Tests

__TEST__/e2e/interactive-export-filename.spec.mjs — three e2e tests:

  • pre-fill from a local filename,
  • stale-clear on new media load,
  • non-media (import) inputs don't overwrite the media name.

Full suite green (41/41 e2e).

Also

Bump app version marker + cache-bust editor-core.js to 0.8.10.

…cal file's real name (#426)

Exporting an interactive transcript of a local media file links the media by a
blob: URL with no usable path, so the export modal's "Media file or URL" field
started empty and the user had to type the reference by hand. Whatever was last
typed also persisted across opens, so a throwaway value (e.g. "test") could end
up in the exported page's <video src="…">.

Capture the real filename of a locally-loaded media file — centrally, from a
single capture-phase change listener over any media file input (import inputs for
JSON/SRT/VTT are excluded by a media-type check) — and offer it from
guessMediaSrc so the field pre-fills for local files, the way remote URLs already
fill from the player src. Loading new media clears the field so a name typed for
a previous clip can't linger and be exported by mistake.

Adds e2e tests: pre-fill from a local filename, stale-clear on new media load,
and that non-media (import) inputs don't overwrite the media name.

Bump app version marker and cache-bust editor-core.js to 0.8.10.
@maboa
maboa merged commit 926cc4c into main Jul 28, 2026
1 check passed
@maboa
maboa deleted the fix/interactive-export-prefill-filename branch July 28, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interactive transcript export: pre-fill the media reference from a local file's real name

1 participant