Skip to content

Clarify 'key replacement algorithm'#598

Open
xhwang-chromium wants to merge 1 commit into
w3c:mainfrom
xhwang-chromium:fix-issue-583
Open

Clarify 'key replacement algorithm'#598
xhwang-chromium wants to merge 1 commit into
w3c:mainfrom
xhwang-chromium:fix-issue-583

Conversation

@xhwang-chromium
Copy link
Copy Markdown
Contributor

@xhwang-chromium xhwang-chromium commented May 13, 2026

Fixes 583.

This commit defines 'Key Replacement Algorithm' in the Definitions section to clarify how CDMs manage keys when capacity is reached or new versions are provided. It also updates notes in MediaKeySession to use this definition and ensures non-normative language ('recommended' instead of 'RECOMMENDED') is used in notes.


Preview | Diff

…3c#583)

This commit defines 'Key Replacement Algorithm' in the Definitions section to
clarify how CDMs manage keys when capacity is reached or new versions are provided.
It also updates notes in MediaKeySession to use this definition and ensures
non-normative language ('recommended' instead of 'RECOMMENDED') is used in notes.
@xhwang-chromium xhwang-chromium changed the title Clarify 'key replacement algorithm' and fix RFC 2119 keyword usage (#… Clarify 'key replacement algorithm' (#… May 13, 2026
@xhwang-chromium xhwang-chromium changed the title Clarify 'key replacement algorithm' (#… Clarify 'key replacement algorithm' May 13, 2026
IDs MUST NOT be removed because they became unusable, such as due to expiration.
Instead, such keys MUST be given an appropriate status, such as
{{MediaKeyStatus/"expired"}}.
may be removed as the result of a {{MediaKeySession/update()}} call, for example if
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.

This might be redundant, or should explicitly happen in the algorithm key replacement algorithm. Similarly with key status change.

Copy link
Copy Markdown
Member

@marcoscaceres marcoscaceres left a comment

Choose a reason for hiding this comment

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

It might be ok to merge this an editorial clean up, but we should consider moving all these normative parts into the appropriate algorithm(s).

It might be worth while for us to do a ~2 hour working session to move these bits around into the right places. I thinks everything we need is actually here, it’s just not specified in the most optimal way (i.e., algorithmically with state transitions at the appropriate times)

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.

Clarify definition and intent of "replacement algorithm" in update()

3 participants