- From: ddorwin via GitHub <sysbot+gh@w3.org>
- Date: Fri, 10 Apr 2015 22:44:24 +0000
- To: public-html-media@w3.org
ddorwin has just created a new issue for https://github.com/w3c/encrypted-media: == MediaKeySystemConfiguration.sessionTypes should be sequence<DOMString> for forwards compatibility. == `MediaKeySystemConfiguration.sessionTypes` is currently of type `sequence<MediaKeySessionType>`. Because JS dictionaries don't actually have a specific Web IDL type, the dictionary member types are not checked until passed to a Web IDL object that expects a specific type. Thus, enum values in the `sessionTypes` sequence will not be checked until `requestMediaKeySystemAccess()` is called. `requestMediaKeySystemAccess()` takes a sequence of `MediaKeySystemConfiguration` values and **only one must be supported** for success. However, an unsupported value in the `sessionTypes` member of _any_ configuration would cause an exception, preventing a supported configuration in the sequence from succeeding. Thus, an application would not be able to use a new `MediaKeySessionType` value with the expectation that older implementations would ignore the configuration and try subsequent configurations. To allow values to be added to `MediaKeySessionType` in the future, we should change the `sessionTypes` member to be of type `sequence<DOMString>`. This will allow the implementations to reject individual configurations with unrecognized session types. **Example** The first line does not throw, so the application cannot detect whether the enum is supported: >`configurations[0].sessionTypes = [ "temporary", "future-type" ];` >`configurations[1].sessionTypes = [ "temporary" ];` This line will result in a type error rather than processing the configurations and ignoring the first one. >`navigator.requestMediaKeySystemAccess("org.w3.clearkey", configurations).` See https://github.com/w3c/encrypted-media/issues/47
Received on Friday, 10 April 2015 22:44:25 UTC