Re: [webrtc-encoded-transform] Generalize ScriptTransform constructor to allow main-thread processing (#89)

I'm glad to hear there was no negative performance impact.

> The negative part was the extra complexity/maintenance burden of introducing a worker in their architecture ...

The spec API simplifies workers.

> The use case I use as an example is https://webrtc.github.io/samples/src/content/insertable-streams/video-analyzer/, where the whole point of the processing is to get data that is presented on the page by code running on the main thread.

I've updated https://github.com/webrtc/samples/pull/1646 to use the spec. It's only a [few lines](https://github.com/webrtc/samples/pull/1646/files) of difference (moving code to worker), and it's more performant, since there was no need to move processing to main thread in the first place.

 Here's a [working demo](https://jan-ivar.github.io/samples/src/content/insertable-streams/video-analyzer/) that works in all browsers. Hopefully this is helpful for those needing help with workers. 

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-encoded-transform/issues/89#issuecomment-1858693240 using your GitHub account


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

Received on Saturday, 16 December 2023 02:58:57 UTC