mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-05 19:42:15 +02:00
doc: update README and comments
This commit is contained in:
parent
849cb0c7fc
commit
9fc6360032
7 changed files with 54 additions and 17 deletions
|
@ -6,8 +6,8 @@ It has no dependencies and high performance, but is only available on recent ver
|
|||
|
||||
**WARNING:** The public API is UNSTABLE. If you have any questions, please open an issue.
|
||||
|
||||
- [Compatibility](#compatibility)
|
||||
- [Usage](#usage)
|
||||
- [Compatibility](#compatibility)
|
||||
- [Usage](#usage)
|
||||
|
||||
## Compatibility
|
||||
|
||||
|
@ -17,13 +17,13 @@ It has no dependencies and high performance, but is only available on recent ver
|
|||
|
||||
## Usage
|
||||
|
||||
It draws frames onto `decoder.element` (a `<canvas>` element), you can insert it anywhere you want to display the video.
|
||||
It draws frames onto `decoder.renderer` (a `<canvas>` element), you can insert it anywhere you want to display the video.
|
||||
|
||||
```ts
|
||||
const decoder = new WebCodecsDecoder();
|
||||
document.body.appendChild(decoder.element);
|
||||
document.body.appendChild(decoder.renderer);
|
||||
|
||||
videoPacketStream // from `@yume-chan/scrcpy`
|
||||
.pipeTo(decoder.writable)
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
```
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@yume-chan/scrcpy-decoder-webcodecs",
|
||||
"version": "0.0.17",
|
||||
"description": "TypeScript implementation of Scrcpy.",
|
||||
"description": "Raw H.264 stream decoder and renderer using WebCodecs API (requires modern browser).",
|
||||
"keywords": [
|
||||
"adb",
|
||||
"android-phone",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue