13:41:21 RRSAgent has joined #webrtc 13:41:21 logging to https://www.w3.org/2022/06/23-webrtc-irc 13:41:49 Meeting: WebRTC June 2022 VI 13:41:49 Chair: HTA, Bernard, Jan-Ivar 13:41:49 Slideset: https://lists.w3.org/Archives/Public/www-archive/2022Jun/att-0006/WEBRTCWG-2022-06-23.pdf 13:41:49 Agenda: https://www.w3.org/2011/04/webrtc/wiki/June_23_2022 13:59:21 Regrets+ Carine 14:01:22 eehakkin has joined #webrtc 14:01:39 Present+ Bernard, Dom, Elad, Florent, Harald, Jan-ivar, Patrick_Rockhill, Eero_Hakkinen 14:01:48 Present+ TuukkaT 14:01:53 Present+ TimPanton 14:02:49 Recording is starting 14:02:58 Present+ Guido 14:03:07 Present+ Youenn 14:04:16 eehakkin_ has joined #webrtc 14:04:19 scribe+ 14:04:32 Present+ Riju 14:05:31 Topic: -> https://github.com/w3c/webrtc-charter/ WebRTC WG Re-Charter 14:05:31 -> http://w3c.github.io/webrtc-charter/webrtc-charter.html Draft updated charter for the WebRTC WG 14:05:31 [slide 9] 14:09:22 steely-glint has joined #webrtc 14:09:32 dom: we need a new charter, and to discuss issue #70 (migrating work to another group) 14:09:42 youenn: would this require rechartering Media WG? 14:09:44 dom: not sure, possibly 14:10:00 aboba: we have a joint meeting with Media WG at TPAC 14:11:05 dom: but we can't wait until then to come to a conclusion 14:11:37 youenn: migrating items between charters is always challenging from our side, in administrative aspecs 14:12:47 bernard: do we need meetings with the media wg to discuss this? 14:13:06 dom: if we want to migrate the work, yes - but we first need to decide whether we want to do that 14:13:30 bernard: the fact that we have dependencies on videoframe makes it an interesting question to consider 14:13:43 elad: how busy is the Media WG? would it increase or decrease the pace of our work? 14:15:18 harald: that would have to be something to discuss with the chairs 14:15:43 dom: bringing it to media wg would bring more of a media perspective when this group comes more with a transmission perspective 14:16:35 harald: so the chairs will discuss this with the Media WG chairs 14:16:43 dom: no objection from the group in exploring this? 14:16:44 [none] 14:17:02 Topic: -> https://github.com/w3c/mediacapture-region Region Capture Issues 14:17:02 Subtopic: Issue #17: the case for making CropTarget Sync 14:17:02 [slide 13] 14:18:04 Jan-Ivar: this is about the cropping API - issue #17 is about whether it should be sync vs async 14:18:23 ... long discussion on the issue - I'll be presenting arguments why it should be sync 14:19:14 ... The TAG design principles include encouragement to use sync APIs when appropriate, with some exceptions (incl cross-process communications) 14:19:16 [slide 14] 14:19:52 Jan-Ivar: the API currently in the spec (that doesn't have consensus) is async 14:20:14 ... so you have to `await CropTarget.fromElement(element)` 14:20:29 ... I'm proposing it doesn't need to be async, 14:20:48 ... the purpose of the operation is associating an identifier with an element 14:21:07 ... as currently specified, it can't fail 14:21:39 ... the goal of the crop target is to share it over postMessage across documents 14:21:47 [slide 15] 14:22:09 Jan-Ivar: multiple actions needs to happen before we're cropping anything 14:22:32 ... cropTarget can be done ahead of time or later 14:23:11 ... if it gets postMessaged to the top-level document, the said document can offer to the user to crop to that target 14:23:36 ... it's only at the end of this process that there is a clear intent to crop 14:24:09 ... UA can optimize this by running some of the underlying tasks early, but that creates risks in case this doesn't go through 14:24:21 ... the complexity of that situation shouldn't be exposed to developers 14:24:35 [slide 16] 14:25:02 Jan-Ivar: #48 is asking to allow failure from the minting process due to resource exhaustion 14:25:16 ... which seems linked to optimizations implemented in Chrome 14:25:34 ... The issue is that it allows random document to exhaust cropping resources 14:25:59 ... since the API is not gated by permissions - creating DOS risks 14:26:35 ... and may expose apps that don't deal well with that failure 14:26:52 ... if resource allocation is moved to the cropTo step, this risk disappears 14:28:00 ... similar to mediaSource.getHandle 14:28:53 [slide 17] 14:30:51 Jan-Ivar: I believe my proposed API is faster, simpler and still optimizable 14:31:08 ... I don't think we need to block on inter-process communication 14:31:09 [slide 18] 14:32:17 jan-ivar: failing of optimization shouldn't imply a failure of the operation 14:32:38 ... optimizations that influence API design decision tend to generate further issues 14:32:44 ... because optimizations create new side effects 14:33:07 ... there is no developer benefits to this API being async 14:33:44 ... and there are general developer costs to async APIs - they create pre-emption points which risk data races 14:34:16 ... multiplying failure points for rare error cases is a footgun 14:34:28 ... and async is slower as I've shown 14:35:30 elad: the TAG offers design principles, but also meta principles - not sure it's productive to discuss other browsers implementation 14:35:51 ... the fingerprinting risk is reasonable, but the spec doesn't force to surface this 14:36:06 ... a promise doesn't have to fail in your implementation either 14:36:52 jan-ivar: the API should be designed on principles 14:37:27 ... Mozilla is here to push a better API for the Web 14:37:34 Subtopic: Issue #17: the case for making CropTarget Async 14:37:34 [slide 20] 14:37:51 Elad: this API is used in production through origin trial 14:37:59 ... we know the API works and makes developers and customers happy 14:38:12 ... we've learned a lot of lessons by implementing and shipping this 14:38:16 [slide 21] 14:38:34 Elad: the question is whether minting a token needs to be sync or async 14:38:54 ... I'll explain the Chrome decision and that it doesn't impact negatively anyone else 14:39:01 [slide 22] 14:39:44 Elad: our implementation keeps track of which apps have a crop target 14:40:29 ... once it's postMessage'd, this allows Chrome to optimize the time-to-cropping when the cropTo method is actually invoked 14:40:52 ... that makes it simpler and more performant, in particular in case of CPU congestion in the capturing document 14:40:55 [slide 23] 14:41:20 [slide 24] 14:41:46 Elad: Chrome needs this to be async, whether Mozilla prefers it to be sync 14:42:09 ... what's the harm of having an async API? 14:42:11 [slide 25] 14:42:40 Elad: Priority of consistuencies goes through users, developers, implementers, spec writers 14:42:44 [slide 26] 14:42:55 Elad: from a user perspective, seems mostly orthogonal 14:43:31 ... from a developer perspective - what we've heard is that they don't care as it doesn't change much in their huge existing codebase 14:43:51 ... implementors - as an implementor, we see this as an imperative for us 14:43:58 [slide 27] 14:44:33 Elad: what is the negative impact then? Is this theoretical purity? 14:44:42 ... given that IPC is involved, async makes sense 14:44:42 [slide 28] 14:45:07 Elad: the TAG actually insists that theoretical purity doesn't trump implementers needs 14:45:10 [slide 29] 14:45:19 Elad: the TAG discussed this API 14:45:43 ... they were satisfied with the API 14:45:49 ... they haven't seen much ergonomic gain for sync 14:46:09 fbeaufort has joined #webrtc 14:46:16 ... they also highlighted that interop should drive the work of the group 14:46:18 [slide 30] 14:46:40 Elad: I've shown that consistuencies either don't care about sync vs async, and that at least one implementor needs async 14:46:59 ... also, it's easy to go from async to sync, while the other way is difficult 14:47:18 Subtopic: #17 discussion 14:47:41 Bernard: by making it async, you're saying that this implies that when you have a cropTarget, you know it's ready to use 14:47:58 ... we've had situations in the WebRTC WG where we've found that sync APIs needed in fact to be async 14:48:08 Elad: cf slide 22 14:50:27 Youenn: I'm surprised you're saying this is MUST - I thought this was implementable as a sync API, but that you favored the trade-off that async allows 14:51:10 ... as I've pointed out, this trade-off creates a fingerprinting and interop issue - so a footgun 14:51:41 ... so I thought both were implementable but sync would be more complex in Chrome 14:51:52 Elad: I don't agree with that characterization 14:52:09 Youenn: I'm surprised that both approaches are faster - both can't be true 14:52:17 s/are faster/are claiming to be faster/ 14:52:50 Youenn: usually sync APIs are more efficient, except when they creating a blocking situation, which I'm not hearing is the case here 14:52:58 ... a sync API helps developers, at least a bit 14:54:10 Elad: resource allocation design decision is orthogonal to sync vs async 14:55:02 ... I don't think the resource mitigation limits fingerprinting risks can be mitigated through a per-iframe limit 14:55:50 ... in terms of performance, what needs to be fast is cropTo - anything before that, the user doesn't notice 14:55:52 anssik has joined #webrtc 14:57:19 youenn: sync cropTarget minting is faster, but you're saying this is not a relevant optimization compared to cropTo 14:57:53 elad: anything that comes before cropTo is irrelevant to user perceived performance (and mostly negligible in any case) 14:58:24 TimP: as a developer, I have a mild preference to keep it sync as it's easier to use 14:58:33 ... I don't think a developer benefit to making it async 14:58:49 ... there may be a user benefit in terms of the crop transition UX 14:59:06 ... that may convince me of the value if it can be shown 15:00:01 ... from the developer perspective, managing interesting failures on obtaining target would also be convincing, but I haven't heard that 15:00:26 Elad: it's a particular choice of trade-offs that require async, and async isn't going to harm other consistuencies 15:00:31 TimP: developers will suffer 15:00:37 Elad: I claim it's negligible 15:01:04 TimP: I don't agree - this can generate non-trivial changes, although it's certainly doable 15:02:04 Jan-Ivar: re no downside - nobody claiming that Chrome optimizations aren't useful 15:02:13 ... I don't understand why these optimizations can't be done with a sync API 15:02:24 ... why can't you implement a fallback? 15:02:51 ... other downsides include fingerprinting, DOS, proliferation of async, failure management for developers 15:03:08 ... why does it need to be async? 15:03:36 Harald: code complexity itself is a risk; this particular implementation has been used and tested 15:04:28 ... anyone that depends on cropTo and doesn't notice it failing as an issue 15:04:52 ... it's time to stop this discussion - we have seen that Chrome claims that a sync implementation would be make it significantly more complex 15:05:08 ... the impact on developers is irritating but not fatal 15:05:23 ... we have not seen compelling arguments that we need to change what has been proposed 15:05:58 ... I don't see consensus for change, there is an implementation of the current spec - I suggest we declare the API to be async and move on 15:06:40 Jan-Ivar: I hear ease of implementation - complexity in the API trumps complexity of implementation 15:06:49 ... because of the priority of consistuencies 15:07:15 Harald: a more complex API that does the right thing is better than a simple API that does the wrong thing 15:08:18 Elad: I'm not seeing consensus, but I don't think there are remaining benefits to discuss this 15:09:34 dom: we could either run a vote, or wait for more implement experience 15:10:17 s/implement/implementation/ 15:10:52 TimP: I would be inclined to say that getting other implementation is most important 15:11:03 ... sync would be more elegant, but it doesn't look like we're going to get that 15:11:20 Subtopic: Issue #18: Is CropTarget name too generic? 15:11:20 [slide 33] 15:12:41 Youenn: "crop" as at term isn't used too broadly so far, so probably OK 15:12:43 ... not sure that "target" helps 15:12:48 [slide 34] 15:13:45 [slide 35] 15:14:48 Youenn: "object whose sole purpose is to be given cropTo" - may not be limited to elements 15:14:59 ... the term CropRegion might work better to represent 15:15:11 ... and would align with the spec name ("region capture") 15:15:57 ... thoughts? 15:16:39 TimP: the name should reflect that it is a token, not a region or a target itself 15:16:45 ... if it's opaque, it should say so 15:16:57 Youenn: it may not remain opaque 15:17:10 TimP: a region sounds like something you could do math on, e.g. calculate its surface area 15:17:17 ... which you can't 15:17:50 elad: similar reservation - region feels something with coordinates; also, a cropTarget isn't static, it can move, which cropregion makes more misleading 15:18:19 harald: this is bikeshedding; I don't see benefit in changing it 15:18:44 Bernard: +1 that CropRegion is confusing; I prefer the current name 15:19:16 Youenn: any interest in clarifying the definition (i.e. whether it's a reference to an element or something more generic) 15:19:24 ... I guess that can be done later 15:20:00 RESOLVED: close #18 without changing the name of CropTarget 15:20:06 RRSAgent, draft minutes 15:20:06 I have made the request to generate https://www.w3.org/2022/06/23-webrtc-minutes.html dom 15:20:12 Subtopic: Issue #63: Cropping non-self-capture tracks 15:20:12 [slide 38] 15:20:25 Elad: currently you can crop only to current tab 15:20:35 ... I suggest we allow cropping arbitrary tabs 15:20:54 [slide 39] 15:21:28 [slide 40] 15:22:46 Jan-Ivar: a concern is that it might allow sites to censor themselves when captured 15:23:03 Elad: the capturing app can ignore crop targets 15:24:35 ... in fact, cropping automatically would make no sense 15:24:46 Jan-Ivar: I want the group to be aware of the risk 15:24:50 Elad: but is it likely? 15:25:52 Jan-Ivar: I won't predict the future; I don't see other issues with this 15:26:05 harald: please write this up in the github issue; I don't understand the risk 15:26:23 TimP: I support allowing this beyond self-capture 15:27:44 Elad: can we agree that by next meeting we agree to expand this unless a compelling case is made against it? 15:28:45 Jan-Ivar: imagine a bank wanting to redact what would get shared over screen capture 15:29:10 ... can write this up by next meeting 15:29:14 Harald: I support this too 15:29:17 dom: me too 15:29:24 Subtopic: Making CropTargets stringifiable 15:29:24 [slide 41] 15:29:54 Elad: making croptargets stringifiable would help e.g. for communication over capture handle 15:30:03 ... not sure I understand the risks 15:30:43 Youenn: a string makes it much more difficult to garbage-collect a croptarget 15:35:19 Jan-Ivar: +1 to Youenn 15:35:43 ... I haven't heard use cases that justify this 15:35:50 ... having GCable croptarget is good to keep 15:37:49 youenn: if a croptarget comes with resource allocation, being able to end these allocations is a good thing 15:38:09 elad: you can't just associate the string to the element, and when gc'ing the croptarget, remove that association 15:38:45 TimP: this removes the opacity that I relied in my previous support 15:38:58 ... stringifying makes it harder to reason about the safety of this 15:39:35 elad: the only difference between the two is equality 15:39:44 jan-ivar: there are differences in garbage collection 15:39:54 TimP: from a developer perspective, there is a difference 15:40:11 ... there are very limited number of paths to get a cropTarget 15:40:26 ... once it's a string, many more paths can be used 15:41:02 Youenn: can you bring that argument to the github? 15:41:29 Elad: would like to get resolution to this; we can skip the predictable errors 15:42:16 harald: part of the issue seems to be about reconstructing a croptarget from a string (not about stringifying per se) 15:42:30 Topic: -> https://github.com/w3c/mediacapture-extensions/pull/48 Face Detection 15:42:31 -> https://github.com/riju/faceDetection/blob/main/explainer.md Face Detection explainer 15:42:31 [slide 45] 15:44:31 [smode 46] 15:45:58 riju: this shows our proposal helps reduce power consumption - almost 2x at 15fps compared to using TF.js 15:46:03 s/smode/slide 15:46:45 youenn: the 1st column has no face detection, and the 2nd is doing face detection in the driver? 15:46:51 tuukka: right 15:47:32 youenn: in some OSes, the two might be equal if the camera is doing it systematically 15:47:46 riju: indeed, in Android this might be the case 15:47:56 [slide 47] 15:48:27 Riju: having a persistant id is very important for face tracking 15:48:46 ... re keeping the probably optional - sure, but all platforms provide this 15:49:13 steely-glint_ has joined #webrtc 15:49:15 ... a developer may use this to decide to apply further processing (e.g. funny hat) 15:49:27 ... but open to making it optional 15:49:49 ... Re VideoFrameMetadata, you suggest coordination on WebCodecs? 15:50:05 Youenn: yes, we need to engage with them to find the right construact 15:50:09 s/act/ct 15:50:29 Riju: re API surface, we started with a minimal set, increased it based on feedback 15:50:37 ... but we can re-reduce it for the MVP 15:50:44 ... e.g. remove the mesh parts 15:50:55 ... the contour was Harald's request 15:51:26 ... face landmarks are usually important in post-processing, think we should keep in MVP 15:51:39 youenn: my point was in terms of priorities & focus 15:51:48 ... e.g. for the next 6 months 15:52:03 riju: removing mesh, but keep landmarks 15:52:24 harald: I still have a problem with the API 15:52:33 ... the power consumption improvement is nice-to-have 15:52:41 ... attachment to the videoframe is nice 15:52:47 ... but still unclear what to use it for 15:52:59 ... the explainer doesn't help much with it 15:53:10 ... what can I do with the output of that API? 15:53:16 ... what the MVP would be viable for? 15:53:49 riju: e.g. landmarks would be used for post-processing, e.g eye-gaze correction 15:54:36 ... the platforms only give bounding boxes at this stage 15:54:51 Harald: I would like to a more complete use case 15:55:10 Youenn: one use case is that some encoders optimize based on specific bounding boxes 15:55:49 Bernard: +1 to youenn - segmentation helps with encoding 15:57:02 Jan-Ivar: the explainer talks about attaching to videoframe, but the API is still anchored in mediastreamtrack (e.g. for capabilities) 15:57:14 ... how would this API be usable on non-camera sources? 15:57:24 ... e.g. on recorded videos 15:57:45 riju: we couldn't use the same platform APIs to get the power consumption benefits 15:58:44 youenn: I think cameras should be our primary target 15:58:56 ... for recorded videos, you could add this through a media capture transform 15:59:25 jan-ivar: adding these metadata through the transform? 15:59:27 youenn: ye 15:59:31 s/ye/yes 16:00:07 eero: our proposal has support for setting custom metadata in videoframe 16:00:25 harald: the constraints are used to instruct the driver to produce the info, which is then attached to the videoframe 16:00:29 ... that makes sense to me 16:00:51 ... but writing up the enhanced encoding use case would help making compelling 16:01:04 riju: any support for prototyping this? 16:01:13 harald: yes - we need to find compelling applications 16:01:51 riju: also heard support from youenn 16:02:06 jan-ivar: I still have some concerns whether this would reveal difference across platforms 16:02:21 ... would suggest raising an issue on Mozilla's standard positions 16:02:41 bernard: useful to prototype; the metadata discussion should be brought to the WebCodecs falks 16:02:43 s/falks/folks/ 16:02:52 riju: will follow up accordingly 16:02:55 RRSAgent, draft minutes 16:02:55 I have made the request to generate https://www.w3.org/2022/06/23-webrtc-minutes.html dom 16:03:25 RRSAgent, make log public