- From: <bugzilla@jessica.w3.org>
- Date: Wed, 28 May 2014 04:29:55 +0000
- To: public-html-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25902 Bug ID: 25902 Summary: [EME] Don't use Date for MediaKeySession.expiration Product: HTML WG Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P2 Component: Encrypted Media Extensions Assignee: adrianba@microsoft.com Reporter: cpearce@mozilla.com QA Contact: public-html-bugzilla@w3.org CC: bzbarsky@mit.edu, mike@w3.org, public-html-media@w3.org Having MediaKeySession.expiration return a Date is a bad idea. There's a big thread at https://www.w3.org/Bugs/Public/show_bug.cgi?id=22824 about why Date is bad, but the short of it is that if you have a Date-valued attribute it will return a new Date object every single time you do the get. This means that you get things like: if (foo.expired == foo.expired) // Always tests false! So how about making the expiration the number of milliseconds since the Unix epoch after which the license expires? This can then be passed into a JavaScript Date() constructor if desired. NaN can be returned when the expiration is not known. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Wednesday, 28 May 2014 04:29:56 UTC