w3c/picture-in-picture

Integration with HTML

Closed this issue · 12 comments

In #150, @domenic wrote the following. Creating an issue so it doesn't get lost.

Note that (if it has multi-implementer interest) the https://wicg.github.io/picture-in-picture/#htmlvideoelement-extensions section should migrate to the HTML Standard, linking to the algorithms defined in this separate specification. This would also allow the chance to fix several issues with the current specification due to insufficient integration (e.g. the use of EventHandler attributes on HTMLMediaElement instead of GlobalEventHandlers, or the way that autoPictureInPicture, disablePictureInPicture, onenterpictureinpicture, andonleavepictureinpicture have no definitions).

@mounirlamouri As we're thinking about Candidate Recommendation, what shall we do with this issue?

Not that I'm participating, but I'd highly encourage you to do this integration. You get a ton of stuff for free when you integrate with HTML, plus you get awesome feedback from the HTML editors.

(and you potentially reduce a bunch of spec duplication)

@marcoscaceres I'm gonna re-open this one as I think you meant closing #148 when submitting #187

oh, yes, sorry about that!

Adding to the agenda to discuss whether the group thinks we should merge middle-size specifications like Picture-in-Picture to the HTML specification. The group agreed to move Media Playback Quality that's definitely short and it seems likely we wouldn't move large specification like MSE or EME. Where do we draw the line?

Note, this isn't about merging the spec back into HTML: it's about a "fair division of labor" between the two specs. I don't think the HTML folks want to maintain that picture-in-picture specific details, but anything related to HTMLVideoElement should really go into HTML... and HTML pointing back to this spec as needed (as per the OP).

I understand but if we start splitting away extensions to HTMLVideoElement from this spec, we are going to have a spaghetti specification where half of it is in the HTML spec and half in the Picture-in-Picture spec.

This spec already depends on all the following things defined in other specs (image below)... the thing I guess to weigh up is if anyone else would also benefit from the extensions being made to HTMLVideoElement.

Screen Shot 2020-06-17 at 9 25 05 am

I seems to me that it's preferable for maintenance that the spec is kept in one place, so +1 to @mounirlamouri's comment above.

Discussed during 11 August 2020 call. Two resolutions taken by the group:

RESOLUTION: Keep the Picture-in-Picture specification as-is as it doesn't extend the HTML specification apart from partial interface
RESOLUTION: Write best practices with regards to media specifications and HTML extension

I opened w3c/media-wg#20 for the best practices. I will close this issue.