ss
This commit is contained in:
@@ -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)),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user