[EME] Proposal: Drop "key" prefix from event names

All MediaKeySession
events<https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html#event-summary>
start
with "key". I propose that we drop "key" from the name, so that the event
names are "error", "message", and "ready".

In the original version of EME, the events were fired at the
HTMLMediaElement, so we needed to differentiate them from other events.
Since the events are now fired at the MediaKeySession object, this is no
longer necessary. Also, the references to "key" are not always accurate.
For example, the "error" event may not be a problem with any key. In
addition, "error" is consistent with the event on other objects and
MediaKeySession's "error" attribute

We might also consider renaming the error code constant prefix, which is
currently "MEDIA_KEYERR_". This was based on MediaError codes
("MEDIA_ERR_"), but I don't see other examples of this pattern, even in the
HTMLMediaElement state constants. Also, the error codes are scoped
to MediaKeyError already.

David

Received on Monday, 14 October 2013 20:45:52 UTC