Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Fix ImageData creation with correct buffer type

Richie McIlroy6e840e9f62e0
diff --git a/apps/desktop/src/utils/socket.ts b/apps/desktop/src/utils/socket.ts
index e0b503848..4484b5b04 100644
--- a/apps/desktop/src/utils/socket.ts
+++ b/apps/desktop/src/utils/socket.ts
@@ -262,7 +262,7 @@ export function createImageDataWS(
}
const imageData = new ImageData(
- frameData.buffer as unknown as ImageDataArray,
+ new Uint8ClampedArray(frameData.buffer),
width,
height,
);