ya-webadb/libraries/scrcpy-decoder-webcodecs
2023-05-22 12:57:03 +08:00
..
src feat(adb): support connect to adb server (#549) 2023-05-14 03:54:03 +08:00
.eslintrc.cjs chore: integrate ESLint 2022-12-22 01:42:24 +08:00
.npmignore chore: integrate ESLint 2022-12-22 01:42:24 +08:00
CHANGELOG.json chore: bump version to 0.0.19 2023-04-09 14:18:42 +08:00
CHANGELOG.md chore: bump version to 0.0.19 2023-04-09 14:18:42 +08:00
jest.config.js chore: update jest config 2022-11-16 00:42:53 +08:00
LICENSE chore: update license year 2023-01-13 02:02:31 +08:00
package.json chore: update dependencies 2023-05-22 12:57:03 +08:00
README.md feat(scrcpy): support Scrcpy 2.0 (#495) 2023-04-15 19:50:46 +08:00
tsconfig.build.json chore: update dependencies 2023-05-22 12:57:03 +08:00
tsconfig.json chore: update dependencies 2023-05-22 12:57:03 +08:00
tsconfig.test.json chore: integrate ESLint 2022-12-22 01:42:24 +08:00

@yume-chan/scrcpy-decoder-webcodecs

Decode and render H.264 streams using the WebCodecs API.

It has no dependencies and high performance, but is only available on recent versions of Chrome.

WARNING: The public API is UNSTABLE. Open a GitHub discussion if you have any questions.

Compatibility

Chrome Firefox Safari Performance Supported H.264 profile/level
94 No No High with hardware acceleration High level 5

Usage

It draws frames onto decoder.renderer (a <canvas> element), you can insert it anywhere you want to display the video.

const decoder = new WebCodecsDecoder();
document.body.appendChild(decoder.renderer);

videoPacketStream // from `@yume-chan/scrcpy`
    .pipeTo(decoder.writable)
    .catch(() => {});