Skip to content

Only send optimised sources to video component#15670

Merged
domlander merged 1 commit intomainfrom
doml/sh-restrict-sources-client
Apr 8, 2026
Merged

Only send optimised sources to video component#15670
domlander merged 1 commit intomainfrom
doml/sh-restrict-sources-client

Conversation

@domlander
Copy link
Copy Markdown
Contributor

@domlander domlander commented Apr 8, 2026

What does this change?

Sets the initial value of optimisedSources to an empty array.

Sources are filtered before they are available to the video component.

Why?

The video element initially receives all video sources. Before the javascript loads and the sources are filtered, the browser may start to download a source that is not preferred for their browser. For example, a user on a small mobile device may find that there browser starts downloading the _720h source, before the JS runs to remove this source.

Once a video has decided on a source from its list, it may not update to another source, even if this original source is removed via JS.

@domlander domlander self-assigned this Apr 8, 2026
@domlander domlander added run_chromatic Runs chromatic when label is applied fronts + curation maintenance Departmental tracking: maintenance work, not a fix or a feature labels Apr 8, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Apr 8, 2026
@domlander domlander marked this pull request as ready for review April 8, 2026 14:46
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

@domlander domlander merged commit badbcdd into main Apr 8, 2026
39 checks passed
@domlander domlander deleted the doml/sh-restrict-sources-client branch April 8, 2026 15:32
@gu-prout
Copy link
Copy Markdown

gu-prout Bot commented Apr 8, 2026

Seen on PROD (merged by @domlander 9 minutes and 16 seconds ago) Please check your changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fronts + curation maintenance Departmental tracking: maintenance work, not a fix or a feature Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants