This commit is contained in:
eric
2026-05-19 06:47:07 +00:00
parent e1d7251545
commit 78e1308063
63 changed files with 2527 additions and 186 deletions

View File

@@ -53,6 +53,7 @@ export class ScrcpyH264Decoder {
constructor(
private readonly canvas: HTMLCanvasElement,
private readonly onDecodeError: (msg: string) => void,
private readonly onFrame?: () => void,
) {}
reset(): void {
@@ -146,6 +147,7 @@ export class ScrcpyH264Decoder {
}
ctx.drawImage(frame, 0, 0);
frame.close();
this.onFrame?.();
},
error: (e) => this.onDecodeError(String((e as DOMException).message || e)),
});