Skip to content

Commit c8a7046

Browse files
feat: Move WebCodecs decoder to Web Worker for better scrcpy video streaming performance
To improve scrcpy streams performance when monitoring up to 6 devices concurrently, WebCodecs decoding tasks have been moved off the main thread to a dedicated Web Worker instance for each device. The application now allocates an OffscreenCanvas that is passed to each worker alongside the scrcpy packet streams. The background Web Worker runs the actual \`@yume-chan/scrcpy-decoder-webcodecs\` logic, resulting in vastly improved stability and responsiveness on the main thread. Old active Web Workers are automatically tracked and properly terminated when devices disconnect, streams switch codec, or components unmount. Co-authored-by: RoiArthurB <16764085+RoiArthurB@users.noreply.github.com>
1 parent f08690e commit c8a7046

0 file changed

File tree

    0 commit comments

    Comments
     (0)