I have video coming from a MediaStream object. My javascript main thread does other heavy compute, so if I render the video on main thread, it causes a lot of stutter. I followed https://stackoverflow.com/a/56747615/10093191 to render video frames on an OffscreenCanvas but the logic here is still driven by grabFrame()/postMessage() calls from the main thread.
Is there a way I can avoid the main thread involvement during rendering?