-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About web worker #29
Comments
My project produces frames in a web worker, I don't know anything about offscreen canvas or what that entails. |
I need to draw multiple videos on one page, but yuv-Canvas has a lot of calculation, which makes the page very slow. |
解决了吗兄弟? |
Hello, If anyone still needs an answer to this question: yes, it's possible to use yuv-canvas in a web worker with an offscreen canvas with some small changes. This function now crashes if you try to use it in a web worker: https://github.com/brion/yuv-canvas/blob/main/src/WebGLFrameSink.js#L472 It crashes because it cannot find the So you can move the feature detection outside of the web worker in the main thread, attach the status to a
If you want you can copy the feature detection from the original Then you can modify the
Then in the web worker where you include the bundle script you need to declare the
Hope this helps to give you an idea and that I didn't miss anything. Cheers, |
Hi, do you know how to combine yuv-canvas with web-worker? It I want to use offscreen canvas, it seems that I have to rewrite yuv-canvas.
The text was updated successfully, but these errors were encountered: