Repository navigation
fix(assets): preview CRI movies by their exported MP4 - #107
Merged
yonglanws merged 2 commits intoNov 9, 2026
Merged
Conversation
The asset browser lists a CRI movie as a .usm file, but the exporter publishes only its encoded MP4 nested under the movie's own key. Map Cri/Video/<key>.usm to Cri/Video/<key>/<name>.mp4 so the browser can play and download it, keeping nested story keys intact. Add a video player, download and open link to the file details modal, and cover the flat and nested mappings in the asset preview tests.
The file details modal already offers Download in its quick actions, so the video preview only needs the open-original link.
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.
Problem
The asset browser lists CRI movies as
.usmfiles, butgetAssetBrowserPreviewhad no mapping for them, so the file details modal showed no preview and no download link.The exporter does not publish the
.usmitself; it publishes the encoded MP4 nested under the movie's own key:Cri/Video/live/MV/music_mv_001_100001.usm→.../Cri/Video/live/MV/music_mv_001_100001/music_mv_001_100001.mp4Cri/Video/live/MV/music_mv_001_100001/music_mv_001_100001.usm→.../music_mv_001_100001/music_mv_001_100001/music_mv_001_100001.mp4Change
.usmfiles underCri/Video/to their exported MP4 ({language}/Cri/Video/<key>/<name>.mp4, moved to the browsed region throughserverAssetUrl).openVideostring to the five core locales.tests/asset-preview.test.ts.Only
Cri/Videois mapped. Member-card USM movies are not exported yet, so they keep showing no preview instead of loading a URL that answers 404.Checks
bun run checkbun run lintbun test tests/asset-preview.test.ts(7 pass)