Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/native-default-audio-session.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@livekit/react-native': minor
---

Configure the iOS audio session natively in the default path, removing the audio engine's JS round trip and its deadlock window. Deprecate the unsafe `onConfigureNativeAudio` callback form of `setupIOSAudioManagement`. Developers can instead pass in a static `IOSAudioSessionPolicy`.
5 changes: 5 additions & 0 deletions .changeset/spicy-webs-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@livekit/react-native': patch
---

Update @livekit/react-native-webrtc to 144.1.2
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,19 +353,26 @@ If your app manages `AVAudioSession` directly, disable the automatic setup:
registerGlobals({ autoConfigureAudioSession: false });
```

For custom automatic behavior, disable the default setup and call
`setupIOSAudioManagement` once during app startup:
For custom categories/modes, disable the default setup and pass a static
policy to `setupIOSAudioManagement` once during app startup:

```js
import { registerGlobals, setupIOSAudioManagement } from '@livekit/react-native';

registerGlobals({ autoConfigureAudioSession: false });

const cleanup = setupIOSAudioManagement(true, (state) => ({
audioCategory: state.isRecordingEnabled ? 'playAndRecord' : 'playback',
audioCategoryOptions: ['mixWithOthers'],
audioMode: state.preferSpeakerOutput ? 'videoChat' : 'voiceChat',
}));
const cleanup = setupIOSAudioManagement(true, {
recording: {
audioCategory: 'playAndRecord',
audioCategoryOptions: ['allowBluetooth', 'mixWithOthers'],
audioMode: 'videoChat',
},
playout: {
audioCategory: 'playback',
audioCategoryOptions: ['mixWithOthers'],
audioMode: 'spokenAudio',
},
});
```

The older `useIOSAudioManagement(room, ...)` hook is still exported for
Expand Down
2 changes: 1 addition & 1 deletion ci/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@livekit/react-native": "*",
"@livekit/react-native-webrtc": "^144.1.1",
"@livekit/react-native-webrtc": "^144.1.2",
"@react-native/new-app-screen": "0.82.1",
"livekit-client": "^2.19.0",
"react": "19.1.1",
Expand Down
10 changes: 5 additions & 5 deletions ci/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1952,15 +1952,15 @@ __metadata:
languageName: node
linkType: hard

"@livekit/react-native-webrtc@npm:^144.1.1":
version: 144.1.1
resolution: "@livekit/react-native-webrtc@npm:144.1.1"
"@livekit/react-native-webrtc@npm:^144.1.2":
version: 144.1.2
resolution: "@livekit/react-native-webrtc@npm:144.1.2"
dependencies:
base64-js: "npm:1.5.1"
debug: "npm:4.3.4"
peerDependencies:
react-native: ">=0.60.0"
checksum: 10/3dda38db0fb76959236be98ea9fad6823b47e23a5fe618fcf06f8e248956e35480b308a6c20ec59c53cadc8dc95ed20ce1d3f0a1b378771db1dc053119ac7f8d
checksum: 10/ed4a3594c060404c89020568f0602ad48c51d9738b5479ef9fdecd330ba49349b98afa5b4db7c9faea394cc62edea993a4e8b39cde1181e79966a1c1da65a97a
languageName: node
linkType: hard

Expand Down Expand Up @@ -3550,7 +3550,7 @@ __metadata:
"@babel/preset-env": "npm:^7.25.3"
"@babel/runtime": "npm:^7.25.0"
"@livekit/react-native": "npm:*"
"@livekit/react-native-webrtc": "npm:^144.1.1"
"@livekit/react-native-webrtc": "npm:^144.1.2"
"@react-native-community/cli": "npm:20.0.0"
"@react-native-community/cli-platform-android": "npm:20.0.0"
"@react-native-community/cli-platform-ios": "npm:20.0.0"
Expand Down
22 changes: 11 additions & 11 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ PODS:
- FBLazyVector (0.82.1)
- fmt (11.0.2)
- glog (0.3.5)
- hermes-engine (0.82.0):
- hermes-engine/Pre-built (= 0.82.0)
- hermes-engine/Pre-built (0.82.0)
- livekit-react-native (2.11.0-beta.1):
- hermes-engine (0.82.1):
- hermes-engine/Pre-built (= 0.82.1)
- hermes-engine/Pre-built (0.82.1)
- livekit-react-native (2.11.0):
- boost
- DoubleConversion
- fast_float
Expand Down Expand Up @@ -37,9 +37,9 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- livekit-react-native-webrtc (144.1.0):
- livekit-react-native-webrtc (144.1.2):
- React-Core
- WebRTC-SDK (= 144.7559.04)
- WebRTC-SDK (= 144.7559.10)
- RCT-Folly (2024.11.18.00):
- boost
- DoubleConversion
Expand Down Expand Up @@ -2530,7 +2530,7 @@ PODS:
- SocketRocket
- Yoga
- SocketRocket (0.7.1)
- WebRTC-SDK (144.7559.04)
- WebRTC-SDK (144.7559.10)
- Yoga (0.0.0)

DEPENDENCIES:
Expand Down Expand Up @@ -2789,9 +2789,9 @@ SPEC CHECKSUMS:
FBLazyVector: 0aa6183b9afe3c31fc65b5d1eeef1f3c19b63bfa
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
glog: 5683914934d5b6e4240e497e0f4a3b42d1854183
hermes-engine: 8642d8f14a548ab718ec112e9bebdfdd154138b5
livekit-react-native: a051e6aa4c21e1b2429d136a3d544ae0ccfa08a6
livekit-react-native-webrtc: 6384bffff182166749ea42ccc419cee6785b0603
hermes-engine: 273e30e7fb618279934b0b95ffab60ecedb7acf5
livekit-react-native: b8a86fb1c57270437f8a010437c0570585a13625
livekit-react-native-webrtc: 5ff3e8d229a3fcd34f99fe4cb1c2c93f92017b0c
RCT-Folly: 59ec0ac1f2f39672a0c6e6cecdd39383b764646f
RCTDeprecation: f17e2ebc07876ca9ab8eb6e4b0a4e4647497ae3a
RCTRequired: e2c574c1b45231f7efb0834936bd609d75072b63
Expand Down Expand Up @@ -2862,7 +2862,7 @@ SPEC CHECKSUMS:
RNCAsyncStorage: 01e4301688a611936e3644746ffe3325d3181952
RNScreens: 0bbf16c074ae6bb1058a7bf2d1ae017f4306797c
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
WebRTC-SDK: ac5965a3cc2c258973466e3b1739ab0308bab0d0
WebRTC-SDK: 1d7fc2ae91da6edd63e25f3882ff24f86a8d9d8b
Yoga: 689c8e04277f3ad631e60fe2a08e41d411daf8eb

PODFILE CHECKSUM: a921a659e37cd7dfb12da519493e10c9f38400a1
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"postinstall": "patch-package"
},
"dependencies": {
"@livekit/react-native-webrtc": "^144.1.1",
"@livekit/react-native-webrtc": "^144.1.2",
"@react-native-async-storage/async-storage": "^1.17.10",
"@react-navigation/native": "^7.1.18",
"@react-navigation/native-stack": "^7.3.27",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.35.0",
"@livekit/changesets-changelog-github": "^0.0.4",
"@livekit/react-native-webrtc": "^144.1.0",
"@livekit/react-native-webrtc": "^144.1.2",
"@react-native/babel-preset": "0.83.0",
"@react-native/eslint-config": "0.83.0",
"@types/fastestsmallesttextencoderdecoder": "^1.0.0",
Expand All @@ -93,7 +93,7 @@
"typescript": "^5.9.2"
},
"peerDependencies": {
"@livekit/react-native-webrtc": "^144.1.1",
"@livekit/react-native-webrtc": "^144.1.2",
"livekit-client": "^2.19.0",
"react": "*",
"react-native": "*"
Expand Down
Loading
Loading