Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fire STEERING_MANIFEST_LOADED event when loading a Content Steering Manifest #5417

Merged
merged 3 commits into from
May 26, 2023
Merged

Fire STEERING_MANIFEST_LOADED event when loading a Content Steering Manifest #5417

merged 3 commits into from
May 26, 2023

Conversation

guillemcabrera
Copy link
Contributor

This PR will...

Fire a new event (STEERING_MANIFEST_LOADED) when the Steering Manifest is loaded and expose on it the content of the received steering manifest.

Why is this Pull Request needed?

We may need the application loading the player to react when receiving Content Steering Manifests. In our case and for now, we are using the steering params for debugging purposes, so it was handy to expose them.

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

Please check the unit tests are enough. As I was using already existing interfaces, I didn't extend much the checks over the event contents. I can do it if I needed.

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

src/types/events.ts Outdated Show resolved Hide resolved
src/controller/content-steering-controller.ts Outdated Show resolved Hide resolved
src/controller/content-steering-controller.ts Outdated Show resolved Hide resolved
@@ -366,3 +367,8 @@ export interface BackBufferData {
* @deprecated Use BackBufferData
*/
export interface LiveBackBufferData extends BackBufferData {}

export interface SteeringManifestLoadedData {
response: SteeringManifest;
Copy link
Collaborator

Choose a reason for hiding this comment

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

response is used in error events and has a broader scope than it does here (type LoaderResponse). Maybe a more fitting property name here would be one of these?

  • data ("data" is used for string | ArrayBuffer | Object responses. The responseText "data" has been parsed so maybe not perfect.)
  • steeringManifest (call it what it is)
  • response (appreciate that this matches the XHR property, so I could be convinced it is fine as-is if other options do not align better with current API conventions)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

used steeringManifest, as it clearly defines the content of that field.

api-extractor/report/hls.js.api.md Outdated Show resolved Hide resolved
docs/API.md Outdated Show resolved Hide resolved
@robwalch robwalch added this to the 1.5.0 milestone Apr 25, 2023
@robwalch robwalch merged commit 966bd3d into video-dev:master May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants