chao faf16d266e update 2 달 전
..
src faf16d266e update 2 달 전
CHANGELOG.json faf16d266e update 2 달 전
CHANGELOG.md faf16d266e update 2 달 전
LICENSE faf16d266e update 2 달 전
README.md faf16d266e update 2 달 전
jest.config.js faf16d266e update 2 달 전
package.json faf16d266e update 2 달 전
tsconfig.build.json faf16d266e update 2 달 전
tsconfig.json faf16d266e update 2 달 전
tsconfig.test.json faf16d266e update 2 달 전

README.md

@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. If you have any questions, please open an issue.

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.element (a <canvas> element), you can insert it anywhere you want to display the video.

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

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