Skip to content

Conversation

@quentinms
Copy link
Contributor

@quentinms quentinms commented Aug 20, 2025

This PR will...

Add a new the hlsjsConfig query param to populate the editor on load. It is added automatically to the permalink whenever a change to the editor is applied.

Why is this Pull Request needed?

It makes it easier to share the demo page with the right config (and playback URL).

Are there any points in the code the reviewer needs to double check?

I have done some QA (e.g. with/without hlsjsConfig, with/without peristance), but I don't know if I have covered all the edge cases.

Resolves issues:

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

@quentinms quentinms force-pushed the bugfix/democonfig-load branch from 0d30cd5 to 61f544e Compare August 20, 2025 17:05
@quentinms quentinms marked this pull request as ready for review August 20, 2025 17:07
Copy link
Collaborator

@robwalch robwalch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a Contribution

The editor is intended for hls.js config options only - not options specific to the demo page application. It is important to keep this space specific to hls.js configuration so that developers do not confuse demo page functionality options like "autoRecoverError" with built-in config supported by the library.

It's great to see the hls.js config options added to the URL. Can this PR focus only on that?

When selecting a test option that includes additional config (ex, emeEnabled and widevine setup options), they should appear in the editor upon making the selection. These changes break that functionality currently. Admittedly, some functional test fields that are not hls.js config options leak into the editor because of this (ex: allowedBufferedRangesInSeekTest is not an hls.js config option). Removing the options specific to item selection when switching to another item has been challenging, while this solves that, it does it at the cost of hiding those options from view, which is not acceptable.

I prefer the editor to be used only for hls.js config options. As a JSON editor and not a JS editor, it has some shortcomings; there is no support for certain config value types (ex, functions, non-finite numbers). That may be a good thing as we do not want to deliver arbitrary JS functions in demo page urls.

@quentinms
Copy link
Contributor Author

Should I keep the two separate then? Keep demo-only configs in demoConfig and make a new hlsConfig query parameter for what's in the editor?

@quentinms quentinms force-pushed the bugfix/democonfig-load branch from 61f544e to df84bf6 Compare August 26, 2025 11:49
@quentinms quentinms changed the title Use the demoConfig value to populate the editor Add an hlsjsConfig query param to populate the demo editor Aug 26, 2025
@quentinms quentinms requested a review from robwalch August 26, 2025 11:59
Copy link
Collaborator

@robwalch robwalch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a Contribution

Run npm run prettier && npm run sanity-check to fix minor formatting issues and check lint and build tasks (there are a couple minor formatting issues).

The interaction with the "Persist" option (STORAGE_KEYS.Editor_Persistence) is interesting. Maybe it should be disabled in permalinks or when the "hlsjsConfig" param is present so that the URL contents are used rather than have the store config applied over them.

@quentinms quentinms force-pushed the bugfix/democonfig-load branch from df84bf6 to 77c98bd Compare August 29, 2025 09:21
@quentinms
Copy link
Contributor Author

Sorry about the formatting issue, I had run prettier but forgot to commit the changes.

I have updated the behavior so it will ignore the local values if we loaded a config from the URL, which should avoid some confusion.

@robwalch robwalch merged commit 293c8da into video-dev:master Sep 6, 2025
12 checks passed
@robwalch robwalch moved this from Top priorities to Done in HLS.js Release Planning and Backlog Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants