From ea642d99cd86d2cebd47cfde9d55715ccc535510 Mon Sep 17 00:00:00 2001 From: Jim Gustafson Date: Fri, 17 Feb 2023 19:25:24 -0800 Subject: [PATCH] Update to RingRTC v2.25.0 --- package.json | 2 +- ts/components/GroupCallRemoteParticipant.tsx | 6 +++++- ts/test-both/helpers/fakeGetGroupCallVideoFrameSource.ts | 6 +++++- yarn.lock | 8 ++++---- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 7a7ad913f..0713b0f33 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "@react-spring/web": "9.5.5", "@signalapp/better-sqlite3": "8.4.3", "@signalapp/libsignal-client": "0.22.0", - "@signalapp/ringrtc": "2.24.0", + "@signalapp/ringrtc": "2.25.0", "@types/fabric": "4.5.3", "array-move": "2.1.0", "backbone": "1.4.0", diff --git a/ts/components/GroupCallRemoteParticipant.tsx b/ts/components/GroupCallRemoteParticipant.tsx index e7f1ab00e..814b864a5 100644 --- a/ts/components/GroupCallRemoteParticipant.tsx +++ b/ts/components/GroupCallRemoteParticipant.tsx @@ -140,7 +140,11 @@ export const GroupCallRemoteParticipant: React.FC = React.memo( // for other participants, or pixel data from a previous frame. That's why we // return early and use the `frameWidth` and `frameHeight`. const frameBuffer = getFrameBuffer(); - const frameDimensions = videoFrameSource.receiveVideoFrame(frameBuffer); + const frameDimensions = videoFrameSource.receiveVideoFrame( + frameBuffer, + MAX_FRAME_WIDTH, + MAX_FRAME_HEIGHT + ); if (!frameDimensions) { return; } diff --git a/ts/test-both/helpers/fakeGetGroupCallVideoFrameSource.ts b/ts/test-both/helpers/fakeGetGroupCallVideoFrameSource.ts index f54d316e5..3cd559281 100644 --- a/ts/test-both/helpers/fakeGetGroupCallVideoFrameSource.ts +++ b/ts/test-both/helpers/fakeGetGroupCallVideoFrameSource.ts @@ -32,7 +32,11 @@ class FakeGroupCallVideoFrameSource implements VideoFrameSource { this.dimensions = [width, height]; } - receiveVideoFrame(destinationBuffer: Buffer): [number, number] | undefined { + receiveVideoFrame( + destinationBuffer: Buffer, + _maxWidth: number, + _maxHeight: number + ): [number, number] | undefined { // Simulate network jitter. Also improves performance when testing. if (Math.random() < 0.5) { return undefined; diff --git a/yarn.lock b/yarn.lock index 49b1fbbd0..18356148c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2187,10 +2187,10 @@ ws "^8.4.2" zod "^3.20.2" -"@signalapp/ringrtc@2.24.0": - version "2.24.0" - resolved "https://registry.yarnpkg.com/@signalapp/ringrtc/-/ringrtc-2.24.0.tgz#634160d24b2e13967a634e0f3236b2b4b5854091" - integrity sha512-BtpTRxSSCPIV6WBxxGuXUj16ZND/O30+l20Ck2TKDFwRyJUDuBfrNUCGtGXvmmt/OQx6wDG3ZyfjePpffdhEvQ== +"@signalapp/ringrtc@2.25.0": + version "2.25.0" + resolved "https://registry.yarnpkg.com/@signalapp/ringrtc/-/ringrtc-2.25.0.tgz#dfa75860c69dd6a81aef568d9fe3fb1a0573a4f7" + integrity sha512-/kOtgYjhqAdPPmmrcX8MaH4YPQX4xVXCzy8ph4NC1NnCK0DiBP9b+jC2sijdx8rHeKhXCcCyeiHVm1LOcnPNjQ== dependencies: tar "^6.1.0"