RE: Clarification on "simple event"

“Simple event” generally means one which uses the Event interface and follows the convention of the same term used in HTML5. Your description below is confusing because it doesn’t look like you want a “simple” event at all—you want to dispatch a MediaEncryptedEvent (not an event using the Event interface directly).



Futhermore, the “init…” methods seem like they are not following the pre-existing constructor pattern.



“trusted events” are those dispatched for the author by the user agent itself. “untrusted” refers to events dispatched directly by the author. These are to have the “isTrusted” attribute set to false.



HTH.







From: Jerry Smith (IEP)
Sent: Tuesday, July 28, 2015 9:33 AM
To: public-html@w3.org
Subject: Clarification on "simple event"


The following question relates to https://github.com/w3c/encrypted-media/issues/17.


The HTML Media Task Force is looking for clarification on what constitutes a “simple event”.  The EME spec (https://w3c.github.io/encrypted-media/) currently defines four "simple events":  two with no attributes (keystatuseschange & waitingforkey) and two with attributes (message & encrypted).  The attributes on the latter two provide initDataType and initData necessary to handle the events.  We’ve seen references to “trusted events” in other places where attributes are provided.

If trusted events was more correct, we might change event handling language like this:

Queue a task to fire a simple event named encrypted at the media element. The event is of type MediaEncryptedEvent and has: initDataType = initDataType initData = initData.

To this:

Queue a task to fire a trusted event with the name encrypted, that does not bubble and is not cancelable, that uses the Event interface, and is of type MediaEncryptedEvent with the track attributes initDataType initialized to initDataType and initData initialized to initData, at the media element.

The specifics on trusted handling aren’t especially relevant though.  Can anyone confirm whether a simple event may include attributes of the type discussed above?

Jerry

Received on Tuesday, 28 July 2015 19:44:33 UTC