W3C home > Mailing lists > Public > public-html-media@w3.org > October 2013

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

From: David Dorwin <ddorwin@google.com>
Date: Mon, 14 Oct 2013 13:45:06 -0700
Message-ID: <CAHD2rshadCkZi_t=pCPO3FZi8T2f9H1ANfGmnYYKTg-5KCDqyg@mail.gmail.com>
To: "public-html-media@w3.org" <public-html-media@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 15:48:41 UTC