Re: [mediacapture-transform] Out-of-main-thread processing by default (#23)

> > But is the any precedent for such an API design?
> 
> Audio worklet is one example.

I was referring specifically to APIs exposed on DedicatedWorker, but not on Window.

> In general, I think that worklets should be the default for those potentially perf sensitive operations. Worker is really a tradeoff here.

How would a worklet support the use cases that require generating a new track in JS? 
In particular, the use case where you want to generate a new track based on the contents of two (or more) existing tracks (i.e., the weather report use case). 

> It is also worth keeping in mind that nothing prevents extending support to window environments in the future, supporting window environments on day 1 does not seem mandatory.

Nothing is mandatory, but going against how all Web APIs are exposed requires in my opinion a stronger argument than the ones I've seen so far. The existence of examples ranging from simple demos to critical enterprise products using the main thread shows that it's technically viable to do it. It's true that a lot of those cases would benefit from moving the processing off the main thread, but I think that's a tradeoff developers should be able to decide. 


-- 
GitHub Notification of comment by guidou
Please view or discuss this issue at https://github.com/w3c/mediacapture-transform/issues/23#issuecomment-838909919 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 11 May 2021 17:54:15 UTC