[w3ctag/design-reviews] Allow transferring ArrayBuffer into WebCodecs object constructors (Issue #889)

こんにちは TAG-さん!

I'm requesting a TAG review of "Allow transferring ArrayBuffer into WebCodecs object constructors".


We're working on adding transferable buffers to [WebCodecs object constructors](https://gist.github.com/Djuffin/1c8fac486ca9f402be85074166e89a16). 
We've copied the transfer-list approach used by [structuredClone ](https://developer.mozilla.org/en-US/docs/Web/API/structuredClone) and [postMessage](https://developer.mozilla.org/en-US/docs/Web/API/Worker/postMessage). 

However a concern have been raised that this mechanism isn't ideal: 
Should we just use a boolean value instead of a transfer list to indicate transferring of the ArrayBuffer contents to a WebCodecs object.
Arguments:
 - Boolean is easier to use and understand for API users.
 - Transfer list can be extended in the future when WebCodec objects need to transfer more than one ArrayBuffer ( we are likely to accept arrays of metadata, HDR data, etc. )
 - Transfer list is consistent with existing APIs like [structuredClone ](https://developer.mozilla.org/en-US/docs/Web/API/structuredClone) and [postMessage](https://developer.mozilla.org/en-US/docs/Web/API/Worker/postMessage). 


We've been asked to solicit TAG guidance on whether copying this mechanism is appropriate in terms of TAG principles around consistency.

  - Explainer¹ (minimally containing user needs and example code): https://gist.github.com/Djuffin/1c8fac486ca9f402be85074166e89a16
  - Specification URL: https://www.w3.org/TR/webcodecs/#dictdef-videoframeinit
  - Tests: https://github.com/web-platform-tests/wpt/tree/master/webcodecs
  - User research: [url to public summary/results of research]
  - Primary contacts (and their relationship to the specification):
      - Eugene Zemtsov ( @Djuffin )  Google LLC
  - Organization(s)/project(s) driving the specification: Chromium
  - External status/issue trackers for this specification (publicly visible, e.g. Chrome Status): https://chromestatus.com/guide/edit/5075602045927424

Further details:

  - [x ] I have reviewed the TAG's [Web Platform Design Principles](https://www.w3.org/TR/design-principles/)
  - The group where the work on this specification is currently being done: Media Working Group

We'd prefer the TAG provide feedback as (please delete all but the desired option):


  💬 leave review feedback as a **comment in this issue** and @-notify @Djuffin




-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/889
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/889@github.com>

Received on Wednesday, 30 August 2023 22:10:01 UTC