Skip to content

Add support for qualityRanking attribute in DASH manifests#187

Merged
Essk merged 6 commits into
videojs:mainfrom
Janet101:feat/parse-qualityRanking
Jun 19, 2026
Merged

Add support for qualityRanking attribute in DASH manifests#187
Essk merged 6 commits into
videojs:mainfrom
Janet101:feat/parse-qualityRanking

Conversation

@Janet101

@Janet101 Janet101 commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

Description

This PR adds support for parsing the qualityRanking attribute from DASH MPD manifests and mapping it to the HLS SCORE attribute for video.js compatibility.

The qualityRanking attribute specifies the quality ranking of a representation relative to others in the same adaptation set. Higher values represent lower quality content. This is mapped to HLS's SCORE attribute, which serves the same purpose and allows video players to make more informed decisions about quality selection beyond just bandwidth considerations.

Example

<Representation id="high" bandwidth="2000000" qualityranking="10">
  ...
</Representation>

Output (HLS playlist attributes):

{
  NAME: 'high',
  BANDWIDTH: 2000000,
  SCORE: 1/(10 + 1),
  ...
}

Test Results

All tests pass successfully:

  • ✅ 196 tests passing (0 failures)
  • ✅ 100% coverage on parseAttributes.js
  • ✅ Overall coverage: 96.64% statements, 89.46% branches

@Janet101 Janet101 changed the title Support quality ranking Add support for qualityRanking attribute in DASH manifests Oct 16, 2025
@Janet101 Janet101 marked this pull request as ready for review October 17, 2025 00:52
@Janet101

Janet101 commented Oct 17, 2025

Copy link
Copy Markdown
Contributor Author

Hi @gesinger @brandonocasey @gkatsev @forbesjo , hope you’re doing well 😄! This is my first contribution to the repo, would you mind taking a look when you have some time?
I’d really appreciate your feedback!

Comment thread src/toM3u8.js Outdated

@gkatsev gkatsev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can internal usage of it be camelCased: qualityRanking

Comment thread src/toM3u8.js Outdated
@Janet101

Janet101 commented Nov 25, 2025

Copy link
Copy Markdown
Contributor Author

can internal usage of it be camelCased: qualityRanking

Good suggestion, updated! 326627b

@Janet101 Janet101 requested review from Essk and gkatsev November 26, 2025 00:01
@Janet101

Copy link
Copy Markdown
Contributor Author

Hi @gkatsev, @Essk ! Is there a process to follow before merging the PR? I don't have merge access yet , could you help out? Thanks so much!

@Essk

Essk commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Thanks @Janet101 — and sorry for the delay. The red unit/coverage checks here are a fork-PR artifact: PRs from forks don't get access to the repo's BrowserStack secrets, so the browser test step can't authenticate and fails early. It's not a problem with your change.

I ran the full suite locally on this branch to confirm:

  • lint — 0 errors
  • test:node (qunit) — 196 pass / 0 fail
  • test:browser (Chrome Headless) — 196 SUCCESS

All green. Merging — CI will run with secrets on main and should go green there.

@Essk Essk merged commit 38040b7 into videojs:main Jun 19, 2026
1 of 3 checks passed
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.

3 participants