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

Clarify that the value of |expiration| should be "NaN" for licenses that never expire #58

Closed
ddorwin opened this issue May 21, 2015 · 0 comments
Assignees
Milestone

Comments

@ddorwin
Copy link
Contributor

ddorwin commented May 21, 2015

The definition of the expiration attribute currently says:

The time, in milliseconds since 01 January, 1970 UTC, after which the key(s) in the session will no longer be usable to decrypt media data, or NaN if no such time exists, as determined by the CDM.

We should clarify that "no such time exists" includes licenses that (explicitly) never expire. Also, Infinity should never be used.

Note: NaN can be difficult to deal with in JavaScript, but I still think it is the best option. Date(0) and Date(null) both result in the Unix Epoch. Date(undefined) results in an invalid time like Date(NaN), but I don't think Web IDL allows attributes to have the value undefined.

joeyparrish added a commit to shaka-project/shaka-player that referenced this issue May 22, 2015
Fix the definition of expiration to be consistent with the details in
w3c/encrypted-media#58 .  In particular, never use infinity.

This means using key status to check if a session is new, rather than
comparing the expiration time to NaN.

Change-Id: Ib1917a34d4dfd0fd29b1c578c6ce60fd996c2698
joeyparrish added a commit to shaka-project/shaka-player that referenced this issue May 22, 2015
Fix the definition of expiration to be consistent with the details in
w3c/encrypted-media#58 .  In particular, never use infinity.

This means using key status to check if a session is new, rather than
comparing the expiration time to NaN.

Change-Id: Ib1917a34d4dfd0fd29b1c578c6ce60fd996c2698
@jdsmith3000 jdsmith3000 self-assigned this Jun 9, 2015
jdsmith3000 added a commit that referenced this issue Jun 12, 2015
@jdsmith3000 jdsmith3000 modified the milestone: V1Editorial Jul 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants