diff --git a/.changeset/goofy-hats-stop.md b/.changeset/goofy-hats-stop.md new file mode 100644 index 00000000..0b2c168b --- /dev/null +++ b/.changeset/goofy-hats-stop.md @@ -0,0 +1,5 @@ +--- +'@livekit/rtc-node': minor +--- + +bump rtc-ffi-bindings to 0.13.1(libwebrtc m150, with WARP enabled by default). diff --git a/packages/livekit-rtc/package.json b/packages/livekit-rtc/package.json index 7282a074..2eb76d8e 100644 --- a/packages/livekit-rtc/package.json +++ b/packages/livekit-rtc/package.json @@ -31,7 +31,7 @@ "dependencies": { "@datastructures-js/deque": "1.0.8", "@livekit/mutex": "^1.0.0", - "@livekit/rtc-ffi-bindings": "0.12.73", + "@livekit/rtc-ffi-bindings": "0.13.1", "@livekit/typed-emitter": "^3.0.0", "pino": "^9.0.0", "pino-pretty": "^13.0.0" diff --git a/packages/livekit-rtc/src/tests/e2e_data_streams.test.ts b/packages/livekit-rtc/src/tests/e2e_data_streams.test.ts index 628f429c..b1cb5f4d 100644 --- a/packages/livekit-rtc/src/tests/e2e_data_streams.test.ts +++ b/packages/livekit-rtc/src/tests/e2e_data_streams.test.ts @@ -477,12 +477,13 @@ describeE2E('livekit-rtc data streams e2e', () => { expect(subscribedReaderCount(receivingRoom!)).toBe(0); // The read settles rather than hanging. Which way it settles is a race - // the SDK doesn't control: the native side emits a clean end-of-stream - // when the room drops the stream (livekit-ffi `read_incremental` sends - // `eos { error: None }` once the channel closes), so either that lands - // first and the read returns the chunks buffered so far, or disconnect - // cleanup errors the stream first and the read reports that. Python is - // deterministic here because it injects a synthetic error end-of-stream. + // the SDK doesn't control: the native side aborts in-flight streams when + // the room shuts down (livekit-ffi sends `eos` with a + // `StreamError::AbnormalEnd`), while disconnect cleanup errors the stream + // from the JS side. Whichever lands first wins. CI has also seen a clean + // `eos` land first, ending the read with the chunks buffered so far; + // that's unexpected after the native abort-on-shutdown change and is + // still being investigated, so it's tolerated here for now. const readResult = await withTimeout( reader.readAll().then( (text) => ({ text }), @@ -492,7 +493,9 @@ describeE2E('livekit-rtc data streams e2e', () => { 'Timed out reading a reader whose room disconnected', ); if ('err' in readResult) { - expect(String(readResult.err)).toMatch(/Disconnected while receiving/); + expect(String(readResult.err)).toMatch( + /Disconnected while receiving|stream closed abnormally: Data stream connection closed/, + ); } else { expect('buffered data'.startsWith(readResult.text)).toBe(true); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 58677972..64b45c7f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -213,8 +213,8 @@ importers: specifier: ^1.0.0 version: 1.1.1 '@livekit/rtc-ffi-bindings': - specifier: 0.12.73 - version: 0.12.73 + specifier: 0.13.1 + version: 0.13.1 '@livekit/typed-emitter': specifier: ^3.0.0 version: 3.0.0 @@ -1153,40 +1153,40 @@ packages: '@livekit/protocol@1.51.0': resolution: {integrity: sha512-kEDEDaFvIcp5VlYBromdSKMJMEJKfPvXPfEaJPdEz1Qgo84gZAoLF2g58CcMlVYGsjrwE5XYgQxRS5B7KuEj3w==} - '@livekit/rtc-ffi-bindings-darwin-arm64@0.12.73': - resolution: {integrity: sha512-gIGftVyO1Jl266AZPRzoL6dxck969dmIiaut3+D1aCZRkDb/gLz98BEGRfOSU3X0LS4QBkmiaYWsjN9ot/zmwg==} + '@livekit/rtc-ffi-bindings-darwin-arm64@0.13.1': + resolution: {integrity: sha512-SIbQpLHmY5oq0hiUM9UTmlkPVLAm8TbTjnQlMWMqQLLFgmtIx+ayN2kLII5w0KIC68iK4yOjTUAeFMAJFYY5hg==} engines: {node: '>= 18'} cpu: [arm64] os: [darwin] - '@livekit/rtc-ffi-bindings-darwin-x64@0.12.73': - resolution: {integrity: sha512-esPwYCbUnDD/KxBo0YU8awTFglRG7SvOT/sfiP19KChS5SH8TgXc7JwfSvnjRx1PndUqHFzQAbQDcYaeL9PFTg==} + '@livekit/rtc-ffi-bindings-darwin-x64@0.13.1': + resolution: {integrity: sha512-+gkitypx0mvtbUxlgnokr1wujFMuVW44q6Bev6AozkfCqpSBnO2bFqwJQo4sGY3UNl9Rq6TElcKPQ813LJu1UA==} engines: {node: '>= 18'} cpu: [x64] os: [darwin] - '@livekit/rtc-ffi-bindings-linux-arm64-gnu@0.12.73': - resolution: {integrity: sha512-2YBatXjuaumnaNVqRC63flX5XZTvHcQWRsABw6e2yp+Hlxl3ocjVVyk5PrAsRzCdeyxbHLduqV9ctqGbpTA27Q==} + '@livekit/rtc-ffi-bindings-linux-arm64-gnu@0.13.1': + resolution: {integrity: sha512-rnWm3ekPXfHvO18CeRahQw4SF+YPiY3eUVHSbDqHPTTO3ohIfOT09qpC1otbaPm5gQYaQPuM0wUpLXDOPhgG0Q==} engines: {node: '>= 18'} cpu: [arm64] os: [linux] libc: [glibc] - '@livekit/rtc-ffi-bindings-linux-x64-gnu@0.12.73': - resolution: {integrity: sha512-BrP3IyNkcjldeO+SbnF0hX2mipst8aHiBIiGJcQCd8HEjsaabfkYk4Y5uoNsTVMrUSyrNrJte2itAhuxP9FCSA==} + '@livekit/rtc-ffi-bindings-linux-x64-gnu@0.13.1': + resolution: {integrity: sha512-jp3CQdwb8gjh/sIL4ur6bVQiQARBnJkZp8sbifbXqWqpYX9lXMvEX5KomPCfsQrHfcuNwYHV4OjrXPXvc5+SEw==} engines: {node: '>= 18'} cpu: [x64] os: [linux] libc: [glibc] - '@livekit/rtc-ffi-bindings-win32-x64-msvc@0.12.73': - resolution: {integrity: sha512-2RnKXMTnNfvjJ3kbuhE1jqFNAQNmqSrxy3GlEnByY61tbtY14QPFn8X/0lh+Mjst8pZdfxkXvtbRyPt5KYHvMA==} + '@livekit/rtc-ffi-bindings-win32-x64-msvc@0.13.1': + resolution: {integrity: sha512-GbEfjBixFbxVx4iWr5J65cIVEdRirzcBdWr17eY2R18qTsr4VVr6mzmorUCq/jwysqE+Sl+d1QWR7oBDQPxbjw==} engines: {node: '>= 18'} cpu: [x64] os: [win32] - '@livekit/rtc-ffi-bindings@0.12.73': - resolution: {integrity: sha512-ZxkCQlsfTG7Eqi6KBXulEWJBUxeRVRYqCc795CsmKsGfqmBX5gE5CnTiynN8fFdzSGwApaVogeGSB6JszCf/Xw==} + '@livekit/rtc-ffi-bindings@0.13.1': + resolution: {integrity: sha512-bcE1N/lr6SNvOKP4eOxBQNuplJMX21Tbe0nyMhV9Cj/wpXCXCjw3eScwyg1R0M32hKvWpoiJDv+EVVmg13Wq1Q==} engines: {node: '>= 18'} '@livekit/typed-emitter@3.0.0': @@ -4843,30 +4843,30 @@ snapshots: dependencies: '@bufbuild/protobuf': 1.10.1 - '@livekit/rtc-ffi-bindings-darwin-arm64@0.12.73': + '@livekit/rtc-ffi-bindings-darwin-arm64@0.13.1': optional: true - '@livekit/rtc-ffi-bindings-darwin-x64@0.12.73': + '@livekit/rtc-ffi-bindings-darwin-x64@0.13.1': optional: true - '@livekit/rtc-ffi-bindings-linux-arm64-gnu@0.12.73': + '@livekit/rtc-ffi-bindings-linux-arm64-gnu@0.13.1': optional: true - '@livekit/rtc-ffi-bindings-linux-x64-gnu@0.12.73': + '@livekit/rtc-ffi-bindings-linux-x64-gnu@0.13.1': optional: true - '@livekit/rtc-ffi-bindings-win32-x64-msvc@0.12.73': + '@livekit/rtc-ffi-bindings-win32-x64-msvc@0.13.1': optional: true - '@livekit/rtc-ffi-bindings@0.12.73': + '@livekit/rtc-ffi-bindings@0.13.1': dependencies: '@bufbuild/protobuf': 1.10.1 optionalDependencies: - '@livekit/rtc-ffi-bindings-darwin-arm64': 0.12.73 - '@livekit/rtc-ffi-bindings-darwin-x64': 0.12.73 - '@livekit/rtc-ffi-bindings-linux-arm64-gnu': 0.12.73 - '@livekit/rtc-ffi-bindings-linux-x64-gnu': 0.12.73 - '@livekit/rtc-ffi-bindings-win32-x64-msvc': 0.12.73 + '@livekit/rtc-ffi-bindings-darwin-arm64': 0.13.1 + '@livekit/rtc-ffi-bindings-darwin-x64': 0.13.1 + '@livekit/rtc-ffi-bindings-linux-arm64-gnu': 0.13.1 + '@livekit/rtc-ffi-bindings-linux-x64-gnu': 0.13.1 + '@livekit/rtc-ffi-bindings-win32-x64-msvc': 0.13.1 '@livekit/typed-emitter@3.0.0': {}