Re: [EME] object-oriented design representing sessions as objects

On Jun 18, 2012, at 8:34 PM, David Dorwin <ddorwin@google.com> wrote:

> Thanks Michael. I thought some more about this and updated the bug with the text below.
> 
> 
> As Michael Chen pointed out, if the events are no longer fired at HTMLMediaElement there is no way to relate the event back to the original element to which it pertains in the proposed API.
> 
> Do we need to be able to relate the event and elements when the events are communicating information about the session?
> 
> If so, the element could be a property of the event or the session object. Sharing session objects between elements could complicate this; maybe not associating the session/events with elements is better for this reason.
> 
  The media element has a similar issue when an audio, video, or text track is added or removed. The 'addtrack' and 'removetrack' events are fired at one of the media element's Track list object, so the events use the the TrackEvent interface [1] which has a 'track' attribute that returns the TextTrack, AudioTrack, or VideoTrack that was added or removed.

eric

http://www.whatwg.org/specs/web-apps/current-work/#trackevent

Received on Tuesday, 19 June 2012 18:30:37 UTC