Re: CfC: Should WebCodecs be exposed in Window environments?

* I prefer to defer decision on exposing VideoEncoder, AudioEncoder,
VideoDecoder, and AudioDecoder in Window contexts at this time

Exposure to Window creates a shortcut to do the wrong thing with realtime
media. The WG seems to agree the main thread is a poor environment for
JavaScript to manipulate realtime media with WebCodecs and related media
APIs. Its potential for high contention and jank may go unnoticed in
development and unit tests, yet degrade inconsistently across devices and
user agents in the field.

Modulo some Canvas hacks, the browsers’ realtime media pipeline never
touches the main thread today. The deprecation of ScriptProcessorNode in
favor of AudioWorklet, sets a precedent for wishing to keep this property
intact while exposing media access APIs to JS.

We haven’t heard sufficient evidence that a handful of mainthread-only and
non-realtime use cases warrant exposure on Window, when workarounds exist
for them (transfer) at a minor performance cost. We think it would be
irresponsible to expose these APIs to Window now, because there would be no
coming back from it. The conservative approach would be to promote and
incentivize use in workers for now (which aligns with the path we wish web
developers take), and defer decision on Window until we have new
information that warrants such exposure.

Further details on this position are available here:
https://docs.google.com/document/d/18OFTfCuZvcEbq_Xmt9VxMqEflV02Z8_2YODDXD_XdFg

On Tue, Jun 22, 2021 at 6:28 AM Chris Needham <chris.needham@bbc.co.uk>
wrote:

> Dear all,
>
> This is a Call for Consensus (CfC) on the question: Should WebCodecs be
> exposed in Window environments?
>
>
>
> For context, please see the WebCodecs specification at
> https://wicg.github.io/web-codecs/ and the discussion on this question at
> https://github.com/w3c/webcodecs/issues/211 and the related question at
> https://github.com/w3c/webcodecs/issues/199.
>
> Note that there is agreement in the Working Group to expose WebCodecs in
> DedicatedWorker context, and so this CfC is limited to exposing the APIs on
> Window.
>
> The CfC will run for 10 days and will end on Friday 2nd July.
>
> Please reply to this email and state one of the following:
>
> * I support exposing VideoEncoder, AudioEncoder, VideoDecoder, and
> AudioDecoder in Window contexts at this time
>
> * I prefer to defer decision on exposing VideoEncoder, AudioEncoder,
> VideoDecoder, and AudioDecoder in Window contexts at this time
>
> In your reply, please detail your reasoning.
>
>
>
> Please send only one reply per member organisation.
>
> Many thanks,
>
> Chris (for the Media WG co-chairs)
>
>
>
>
>
> ----------------------------
>
> http://www.bbc.co.uk
> This e-mail (and any attachments) is confidential and may contain personal
> views which are not the views of the BBC unless specifically stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in
> reliance on it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
>
> ---------------------
>


-- 
.: Jan-Ivar :.

Received on Friday, 25 June 2021 23:01:15 UTC