Git Product home page Git Product logo

Comments (7)

Djuffin avatar Djuffin commented on July 3, 2024 1

Yes, we should consider introducing VideoFrame.canCopyTo(), especially if we end up adding more format options to VideoFrameCopyToOptions

from standards-positions.

youennf avatar youennf commented on July 3, 2024

The use case is fine and the API is better than going through a canvas (more straightforward and async by nature).

from standards-positions.

marcoscaceres avatar marcoscaceres commented on July 3, 2024

This is a draft position. Unless anyone objects within a week we will change it to the official WebKit position.

@Djuffin, we discussed this proposal and we are "supportive" with a concern around the API Design.

The one thing that would be a nice addition is having some means to synchronously detect if copying to a colorspace would be possible without first needing to call .copyTo() (i.e., some kind of support check). We can see it's feasible to, for example, create a VideoFrame and perform support checks by seeing if it throws... but, to us, that feels like not so great developer ergonomics.

Have you thought about adding some kind of mechanism to check what colorspaces the browser supports?

from standards-positions.

Djuffin avatar Djuffin commented on July 3, 2024

VideoFrame.allocationSize() is synchronous and it throws if conversion is not supported.

from standards-positions.

tomayac avatar tomayac commented on July 3, 2024

Else, for inspiration, we just introduced ClipboardItem.supports('image/svg+xml') to the Clipboard API. A similar approach could be feasible here…

from standards-positions.

marcoscaceres avatar marcoscaceres commented on July 3, 2024

Note that WebIDL will drop dictionary member on the floor, so VideoFrame.canCopyTo() can't rely on dictionary (it could take an object though, and then iterate over the member names that way to reject on any unknown member name... and then check the details of each that is supported.)

from standards-positions.

marcoscaceres avatar marcoscaceres commented on July 3, 2024

Closing with "support" position. Please ping us on the W3C side when there's a PR for us to review!

from standards-positions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.