feat(video transcription): add generated video transcriptions to dash preview#1614
Open
kronosmichall wants to merge 3 commits into
Open
feat(video transcription): add generated video transcriptions to dash preview#1614kronosmichall wants to merge 3 commits into
kronosmichall wants to merge 3 commits into
Conversation
05a2731 to
733c0a0
Compare
pizzaeueu
reviewed
Apr 13, 2026
Korczuch
reviewed
Apr 13, 2026
Korczuch
reviewed
Apr 13, 2026
7d9dcf8 to
f849667
Compare
pizzaeueu
approved these changes
Apr 23, 2026
feat: Refactor dashviewer transcription handling to await
f849667 to
7f16525
Compare
| export const X_REP_HINT_DOC_THUMBNAIL = '[jpg?dimensions=1024x1024&paged=false]'; | ||
| export const X_REP_HINT_IMAGE = '[jpg?dimensions=2048x2048,png?dimensions=2048x2048]'; | ||
| export const X_REP_HINT_VIDEO_DASH = '[dash,mp4][filmstrip]'; | ||
| export const X_REP_HINT_VIDEO_DASH = '[dash,mp4][filmstrip][extracted_text]'; |
Contributor
There was a problem hiding this comment.
There are other places where we define x rep hints. Have we added this there as well?
Contributor
Author
There was a problem hiding this comment.
I can't see that for dash. everywhere dash rep is used with X_REP_HINT_VIDEO_DASH which i updated
The non-React subtitle menu uses the array index as each menu item's `data-value`, and `DashViewer.handleSubtitle` reads `cache.media-subtitles` as an INDEX into `this.textTracks`. The previous implementation re-sorted `this.textTracks` by id when appending the new transcription track, which: - broke the user's cached selection (the cached index resolved to a different track — e.g. a user with Spanish selected silently started seeing the auto-generated transcription on the next handleSubtitle), and - produced duplicate `data-value` attributes in the Settings DOM when the new track sorted in the middle of existing entries (since `Settings.subtitles` is push-appended at the end while the menu item was inserted with the new sorted index). Append new tracks to the END of `this.textTracks` and pass `this.textTracks.length - 1` as the new menu index so `Settings.subtitles`, the DOM `data-value`s, and `this.textTracks` stay in lockstep with whatever order existed before.
Sibling rep loaders in DashViewer (loadFilmStrip, requestFilter, manifest fetch) gate URL construction on the migrateAccessTokenToHeader feature flag and prefer createContentUrlV2 when enabled. loadTranscription was hard-coded to createContentUrlWithAuthParams, which would keep sending the access token in URL query params for the transcription request even after the rest of the viewer migrated to header-based auth. Mirror the loadFilmStrip pattern so the transcription request stays consistent with the rest of the viewer when the flag is rolled out.
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.
The fetched
extracted_textrep is a vtt file with AI-generated transcriptions.Waiting for the transcriptions to be generated should not stop the video. It should load when available.
It should be also silently ignored if generating transcriptions failed.
Currently video transcription generation is enabled on dev and staging only