Interactive transcript export: pre-fill the media reference from a local file's real name - #427
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
changelistener 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).guessMediaSrcfor local files, the way remote URLs already fill from the playersrc.Tests
__TEST__/e2e/interactive-export-filename.spec.mjs— three e2e tests:Full suite green (41/41 e2e).
Also
Bump app version marker + cache-bust
editor-core.jsto0.8.10.