Re: [webrtc-encoded-transform] Generalize ScriptTransform constructor (#89)

Re https://github.com/w3c/webrtc-encoded-transform/issues/89#issuecomment-843861793 about complexity: Why is the MessagePort code path more complex than Worker.postMessage? For the user or for the browser implementor?
After all, DedicatedWorker is defined as "act as if it has an internal MessagePort" (https://html.spec.whatwg.org/multipage/workers.html#dedicated-workers-and-the-dedicatedworkerglobalscope-interface), so I assumed that the underlying implementation was OOM the same, since the API is identical.

Re workaround: Yes, that's exactly what I was suggesting in https://github.com/w3c/webrtc-encoded-transform/issues/89#issuecomment-843159755, and it shows that:
1) Requiring posting to a worker does not lead to decreased implementation complexity, since one still has to support processing the stream if it happens to be executing on the main thread (or some other thread)
2) Requiring posting to a worker increases the complexity for the user in the (few) cases where  main thread processing makes sense.




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


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

Received on Wednesday, 19 May 2021 09:19:39 UTC