Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add event handler attributes (e.g. onkeystatuseschange on MediaKeySession) #176

Closed
foolip opened this issue Apr 28, 2016 · 9 comments
Closed
Assignees
Milestone

Comments

@foolip
Copy link
Member

foolip commented Apr 28, 2016

Justification is the same as in w3c/media-source#66 and this issue should probably block on the resolution of that.

@ddorwin
Copy link
Contributor

ddorwin commented Apr 28, 2016

Based on w3ctag/design-principles#29 (comment), we should have event handler attributes for all of our events.

We need to add attributes for both MediaKeySession events:

  • onkeystatuseschange
  • onmessage

Of the HTMLMediaElement events:

  • We already have onencrypted.
  • We need to add onwaitingforkey.

@jdsmith3000
Copy link
Contributor

This is a clearly defined change that is ready for implementation.

@foolip
Copy link
Member Author

foolip commented May 28, 2016

See w3c/html#335 (comment) for a detail you'll need to decide on.

@ddorwin
Copy link
Contributor

ddorwin commented May 31, 2016

@foolip, does this only apply to the two HTMLMediaElement event handlers?

@domenic said, "So I guess if it bubbles it belongs there." Related to bubbling, the spec text currently says:

  • "Queue a task to create an event named encrypted that does not bubble* and is not cancellable..."
  • "Queue a task to fire a simple event named waitingforkey at the media element."
    • Per HTML5, "Firing a simple event named e means that a trusted event with the name e, which does not bubble (except where otherwise stated) and is not cancelable (except where otherwise stated)..."

Thus, it would seem there is no bubbling and thus no need to put these on the GlobalEventHandlers. However, HTML5 also uses the "fire a simple event" language for play, playing, and likely others, which seems inconsistent with @domenic's guidance.

@foolip
Copy link
Member Author

foolip commented Jun 1, 2016

Yeah, all events in HTML are on GlobalEventHandlers even if they don't bubble, for simplicity I suppose.

I would go with extending HTMLMediaElement only, since it's easier to move in the direction of GlobalEventHandlers than moving away from it.

@ddorwin
Copy link
Contributor

ddorwin commented Jun 1, 2016

@jdsmith3000, this is ready for implementation per the original plan.

@jdsmith3000
Copy link
Contributor

jdsmith3000 commented Jun 2, 2016

The original plan included adding attributes for MediaKeySession events:

  • onkeystatuseschange
  • onmessage

And HTMLMediaElement events:

  • Done already: onencrypted
  • Need: onwaitingforkey

Please confirm that we now only need to add an attribute for onwaitingforkey to the HTMLMediaElement extensions.

I'm preparing this change now.

@ddorwin
Copy link
Contributor

ddorwin commented Jun 2, 2016

I don't believe anything has changed with respect to MediaKeySession and we should add those two event handler attributes as well. Yes, the only change to HTMLMediaElement is to add onwaitingforkey.

jdsmith3000 added a commit to jdsmith3000/encrypted-media that referenced this issue Jun 2, 2016
- MediaKeySession:  Added onkeystatuschange and onmessage attributes
- HTMLMediaElement: Added onwaitingforkey attribute and revised
onencrypted attribute description to match the others, and the
description used in MSE
jdsmith3000 added a commit to jdsmith3000/encrypted-media that referenced this issue Jun 6, 2016
Applied to onencrypted (as previous) and onwaitingforkey (new).  Both
are HTMLMediaElement attributes.
jdsmith3000 added a commit to jdsmith3000/encrypted-media that referenced this issue Jun 7, 2016
jdsmith3000 added a commit to jdsmith3000/encrypted-media that referenced this issue Jun 7, 2016
jdsmith3000 added a commit that referenced this issue Jun 7, 2016
- MediaKeySession:  Added onkeystatuschange and onmessage attributes.
- HTMLMediaElement: Added onwaitingforkey attribute.
- Required content & IDL attribute support for HTMLMediaElement events.
@ddorwin
Copy link
Contributor

ddorwin commented Jun 7, 2016

Fixed by 3d4a9ce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants