[Bug 24874] Positive isTypeSupported() may be misleading (MSE vs. .src=)

https://www.w3.org/Bugs/Public/show_bug.cgi?id=24874

--- Comment #8 from David Dorwin <ddorwin@google.com> ---
(In reply to David Dorwin from comment #2)
> The changes for bug 25923, specifically MediaKeySystemOptions, enables a
> less-ugly version of option #3: We could add a sourceType member or
> something similar.
> 
> Ideally, applications should get the desired behavior by default, but that
> could be difficult unless we assume applications want MSE behavior by
> default. It might also require that sourceType be a list or that each source
> type have its own MediaKeysRequirement member in MediaKeySystemOptions.

Below is a specific proposal for adding differentiation of MSE and traditional
sources to MediaKeySystemConfiguration [1]

enum MediaSourceType { "mse", "url" };
dictionary MediaKeySystemConfiguration {
  ...
  sequence<MediaSourceType> sourceTypes = ["mse"];
};

Notes:
* The default value for the new member makes responses default to MSE, which is
what most applications will want.
* This solution allows a single configuration to be used for both MSE and .src
and to get a response as to which one(s) are supported by the returned object.
However, is there actually a use case for this? I assume most applications will
be written for one or the other. 
* The name "MediaSourceType" is generic since this might be useful elsewhere,
though it does sound like it is specific to the Media Source spec.

Handling incompatible sources:
* When a source is already set, the setMediaKeys() promise is rejected with
"NotSupportedError" or "InvalidStateError" (pick one).
* When an unsupported source is set after setMediaKeys() succeeds, the
HTMLMediaElement reports MEDIA_ERR_SRC_NOT_SUPPORTED.


This seems like a lot of work for something that rarely matters, and it is a
bit odd for EME to have to be concerned about this. At least adding a specific
member with a reasonable default to an existing dictionary allows us to
deprecate this member over time if necessary.

[1] https://w3c.github.io/encrypted-media/#idl-def-MediaKeySystemConfiguration

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 11 December 2014 21:40:38 UTC