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

Docs for 6014 EXPIRED seem inaccurate #1319

Closed
chrisfillmore opened this issue Feb 26, 2018 · 5 comments
Closed

Docs for 6014 EXPIRED seem inaccurate #1319

chrisfillmore opened this issue Feb 26, 2018 · 5 comments
Labels
flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this status: archived Archived and locked; will not be updated type: docs Improvements or fixes to documentation
Milestone

Comments

@chrisfillmore
Copy link
Contributor

The docs for EXPIRED say:

The license has expired. This is triggered when playback is stalled on a 'waitingforkeys' event and there are any expired keys in the key status map of any active session.

I think this explanation has a couple issues:

  • Shaka doesn't listen for waitingforkey (also, no s), it listens for keystatuseschange, then checks if keys are expired
  • EXPIRED will only get fired if all key statuses are expired ("any expired keys" in the docs is not correct)

Have I misunderstood? I can submit a PR to update if you agree.

@chrisfillmore
Copy link
Contributor Author

chrisfillmore commented Feb 26, 2018

However, I just noticed this in the spec (emphasis added):

The key is no longer usable for decryption because its expiration time has passed. The time represented by the expiration attribute MUST be earlier than the current time. All other keys in the session MUST have this status.

https://www.w3.org/TR/encrypted-media/#dom-mediakeystatus-expired

@joeyparrish joeyparrish added type: question A question from the community type: docs Improvements or fixes to documentation and removed type: question A question from the community labels Feb 26, 2018
@joeyparrish joeyparrish added this to the v2.4.0 milestone Feb 26, 2018
@joeyparrish
Copy link
Member

The part about 'waitingforkey' is clearly out of date and should be fixed. We used to listen for 'waitingforkey' events specifically to detect a situation when the license server or proxy had a bug and the wrong keys were delivered. We ultimately had to remove that feature because of false negatives.

I think the other details are out of date, as well.

As you noted, all keys in a session have the same expiration time, so they all become expired at once. But keys in different sessions can expire separately.

Although our docs say "any key in any active session", the current behavior is that we fire the EXPIRED error when every known key from every MediaKeySession in this playback (including ones from the past which we closed already) have the "expired" status. So it would be better to say something like:

The license has expired. This is triggered when all keys in the key status map have a status of 'expired'.

What do you think?

@joeyparrish joeyparrish added the flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this label Feb 26, 2018
@joeyparrish
Copy link
Member

(Happy to have a PR, BTW)

@chrisfillmore
Copy link
Contributor Author

Sounds good.

@joeyparrish
Copy link
Member

Cherry-picked for v2.3.3.

@shaka-project shaka-project locked and limited conversation to collaborators Apr 28, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this status: archived Archived and locked; will not be updated type: docs Improvements or fixes to documentation
Projects
None yet
Development

No branches or pull requests

3 participants