You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The RTCRtpScriptTransform constructor takes a Worker argument, limiting the usage of this form of the transform to Workers.
The older createEncodedStreams() function was agnostic as to where the processing was going to take place; a number of existing demos and apps have been written that do processing on the main thread; some have even prototyped both worker-based and main-thread-based processing and deliberately chosen main-thread-based processing.
The normal use case should be worker - but other use cases should be possible.
Proposal: Change the argument type of the constructor from Worker to (Worker or MessagePort). Dispatch the event (which could then be a message) on either the worker's implicit port or the explicit MessagePort.
This allows all the use cases that the older API allowed, but ensures that the simplest code will be the one invoking a Worker.