-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Define <input capture>
, ideally with a hint for which camera to use
#1102
Comments
I believe it's defined in https://w3c.github.io/html-media-capture/, which may not have the best maintenance but they at least accepted my pull request a few days ago. Maybe it's just stable and "done"? In general I favor rolling these sorts of things into HTML, but I imagine the politics and process around that are a bit tricky, and some people might argue that a modular design that allows extension in other specs is better. Tagging in @anssiko who's the current editor. |
Oh, hey, looks like I need to learn how to use a search engine better. Sorry for the noise. |
I don't think it's noise. If we keep it separate, we should probably reference it from several places, such as the element's definition and the indexes. It's nice to have an overview of all of HTML. |
The For new feature requests or hooks to make integration with the HTML spec easier, please feel free to open issues at https://github.com/w3c/html-media-capture/ I'm actively maintaining the spec, even if it may look dormant looking at the commit logs. The spec has just been "done" (and we're stuck at CR mostly because of testing requirements). If you feel like merging the feature into the HTML, I can ask the group about the process hoops to jump through. |
Whichever spec it is in, I'm in support of this. There is one caveat. The proposal turns the IDL from which makes for one backwards incompatible change, which is that disabling capture via JS would no longer work:
I think it's an acceptable tradeoff for a more streamlined flow of capturing with the right camera. |
We should get So let’s please work together on getting |
Sounds good. I'll work with @xfq and the DAS WG on the logistics. FWIW, the |
CfC to integrate HTML Media Capture spec into HTML Living Standard sent to DAS WG, responses due 31 March 2020: https://lists.w3.org/Archives/Public/public-device-apis/2020Mar/0005.html |
Update: CfC passed with no concerns. I asked @wseltzer for advise on how a W3C Host could contribute this feature to HTML LS. I believe the dependency here is whatwg/sg#62. |
Ping @wseltzer for an update. I’ve understood this is now being looked at. Meanwhile, the draft DAS WG Charter now explicitly mentions this:
That said, I hope we could resolve this issue before the new DAS WG charter is in effect July 2020. |
I think the idea is to move all of it over, yes. In general we want attributes and corresponding IDL attributes to be defined in HTML, potentially referencing another document for (part of) the processing model. In this case inlining everything seems easiest. |
What's the status here? |
This needs a volunteer. 😀 |
2023-12-13 summary by @domenic of the work to be done:
We need to upstream https://w3c.github.io/html-media-capture/ into HTML. The core logic is in https://w3c.github.io/html-media-capture/#the-capture-idl-attribute, and needs to be updated to be consistent with the HTML Standard's existing conventions, such as:
Being located in the right place, i.e. in HTML's definition of
HTMLInputElement
, the File Upload state, and the "show the picker, if applicable" algorithm.Adhering to HTML's editorial style, e.g. defining enumerated attributes using the same table format as other enumerated attributes, using lowercase "must" and "should", etc.
Additionally, some portions of user agent advice that are currently in "security and privacy considerations" need to move into the normative text.
For the examples section, not all of it needs to be ported over, but porting over 1-3 HTML or JS code examples and also the file picker rendering examples to https://html.spec.whatwg.org/#file-upload-state-(type=file) would be good.
Finally, we need to add authoring conformance requirements on the
capture
attribute. This would be done by modifying all the discussion about "apply" and "do not apply" in https://html.spec.whatwg.org/#the-input-element; use the existingaccept
attribute as a model. It seems we'll need an additional authoring conformance requirement that the attribute must only be specified if theaccept
attribute is also specified.In general, the
accept
attribute, as another attribute which only applies in the File state, is a good model.Original post follows:
IIRC
<input capture>
isn't actually defined in a spec that's being actively maintained, and offhand I don't know why it wouldn't be defined in HTML with the rest of<input>
's attributes. Ideally its value could be taken fromVideoFacingModeEnum
, (which would be taken as a hint for which camera is preferred). Ifcapture=""
has to remain a boolean attribute for compat reasons, I suppose we'll have to mint a new attribute to carry the hint.The text was updated successfully, but these errors were encountered: