Support multiple self-hosted videos per MIME type#15545
Merged
Conversation
domlander
commented
Mar 17, 2026
| marginTop: '20px', | ||
| }} | ||
| > | ||
| <p style={{ ...textSans17Object }}> |
Contributor
Author
There was a problem hiding this comment.
A drive-by helper for self-hosted video stories. The stories shows a grey square unless the crossOrigin line is commented out
domlander
commented
Mar 17, 2026
| }); | ||
|
|
||
| it('filters out non-video assets', () => { | ||
| it('returns the larger of two MP4 assets', () => { |
Contributor
Author
There was a problem hiding this comment.
This is the new test. The changes outside of this test are from moving the test objects to the describe level and using them in tests, to reduce duplication
|
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
abeddow91
reviewed
Mar 18, 2026
6feff01 to
b9affee
Compare
abeddow91
approved these changes
Mar 18, 2026
|
Seen on PROD (merged by @domlander 16 minutes and 12 seconds ago) Please check your changes! |
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.
What does this change?
Use the largest video per mime type (MP4, M3U8).
Why?
To improve the user experience on mobile, we are transcoding smaller version of self-hosted videos we create and sending the source of this video to DCAR, in addition to the existing, larger one. This PR makes sure that we consistently choose the largest of the files, for when we receive multiple. In a follow-up PR, we will make a decision on what source to use based on the user's browser. However, this will be a touch more complex as ideally it will include a refactor to move dimensions from SelfHostedVideo to Source. This PR is important to ensure we have a consistent experience, by serving the same video each time, in case the tooling work completes before the follow-up PR is ready.