|
|
%!s(int64=2) %!d(string=hai) anos | |
|---|---|---|
| .. | ||
| src | %!s(int64=2) %!d(string=hai) anos | |
| CHANGELOG.json | %!s(int64=2) %!d(string=hai) anos | |
| CHANGELOG.md | %!s(int64=2) %!d(string=hai) anos | |
| LICENSE | %!s(int64=2) %!d(string=hai) anos | |
| README.md | %!s(int64=2) %!d(string=hai) anos | |
| jest.config.js | %!s(int64=2) %!d(string=hai) anos | |
| package.json | %!s(int64=2) %!d(string=hai) anos | |
| tsconfig.build.json | %!s(int64=2) %!d(string=hai) anos | |
| tsconfig.json | %!s(int64=2) %!d(string=hai) anos | |
| tsconfig.test.json | %!s(int64=2) %!d(string=hai) anos | |
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.
| Chrome | Firefox | Safari | Performance | Supported H.264 profile/level |
|---|---|---|---|---|
| 94 | No | No | High with hardware acceleration | High level 5 |
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(() => { });