Skip to content
Open
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/wild-olives-shine.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@livekit/react-native': minor
---

Migrate Apple platforms to AVAudioEngine-based audio device module
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ dependencies {
api 'com.facebook.react:react-native:+'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
api 'com.github.davidliu:audioswitch:89582c47c9a04c62f90aa5e57251af4800a62c9a'
api 'io.github.webrtc-sdk:android:137.7151.04'
api 'io.github.webrtc-sdk:android:144.7559.04'
implementation "io.livekit:noise:2.0.0"
implementation project(':livekit_react-native-webrtc')
implementation "androidx.annotation:annotation:1.9.1"
Expand Down
26 changes: 13 additions & 13 deletions ci/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.9.8):
- hermes-engine (0.82.1):
- hermes-engine/Pre-built (= 0.82.1)
- hermes-engine/Pre-built (0.82.1)
- livekit-react-native (2.10.1):
- boost
- DoubleConversion
- fast_float
Expand Down Expand Up @@ -37,9 +37,9 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- livekit-react-native-webrtc (144.0.0):
- livekit-react-native-webrtc (144.1.0-beta.2):
- React-Core
- WebRTC-SDK (= 144.7559.01)
- WebRTC-SDK (= 144.7559.04)
- RCT-Folly (2024.11.18.00):
- boost
- DoubleConversion
Expand Down Expand Up @@ -2441,7 +2441,7 @@ PODS:
- React-utils (= 0.82.1)
- SocketRocket
- SocketRocket (0.7.1)
- WebRTC-SDK (144.7559.01)
- WebRTC-SDK (144.7559.04)
- Yoga (0.0.0)

DEPENDENCIES:
Expand Down Expand Up @@ -2686,14 +2686,14 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90
DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb
DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
fast_float: b32c788ed9c6a8c584d114d0047beda9664e7cc6
FBLazyVector: 0aa6183b9afe3c31fc65b5d1eeef1f3c19b63bfa
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
glog: 5683914934d5b6e4240e497e0f4a3b42d1854183
hermes-engine: 8642d8f14a548ab718ec112e9bebdfdd154138b5
livekit-react-native: 16923c9c9cdf21c68cbac52f9a5222c9f05c2f06
livekit-react-native-webrtc: a9a45c67543105a40192b144809513e5ab266d0a
glog: fdfdfe5479092de0c4bdbebedd9056951f092c4f
hermes-engine: 273e30e7fb618279934b0b95ffab60ecedb7acf5
livekit-react-native: d3bef98b710d5f0fb6ad1c7734c954ddde910150
livekit-react-native-webrtc: 6fc2ff1df5af82d1adb25828ba14a90380a2073e
RCT-Folly: 846fda9475e61ec7bcbf8a3fe81edfcaeb090669
RCTDeprecation: f17e2ebc07876ca9ab8eb6e4b0a4e4647497ae3a
RCTRequired: e2c574c1b45231f7efb0834936bd609d75072b63
Expand Down Expand Up @@ -2761,7 +2761,7 @@ SPEC CHECKSUMS:
ReactCodegen: 878add6c7d8ff8cea87697c44d29c03b79b6f2d9
ReactCommon: 804dc80944fa90b86800b43c871742ec005ca424
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
WebRTC-SDK: ab9b5319e458c2bfebdc92b3600740da35d5630d
WebRTC-SDK: ac5965a3cc2c258973466e3b1739ab0308bab0d0
Yoga: 689c8e04277f3ad631e60fe2a08e41d411daf8eb

PODFILE CHECKSUM: 2808703946713a7b53edc61b7e02157e7eb82b22
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.0.0",
"@livekit/react-native-webrtc": "^144.1.0-beta.2",
"@react-native/new-app-screen": "0.82.1",
"livekit-client": "^2.15.8",
"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 @@ -1953,15 +1953,15 @@ __metadata:
languageName: node
linkType: hard

"@livekit/react-native-webrtc@npm:^144.0.0":
version: 144.0.0
resolution: "@livekit/react-native-webrtc@npm:144.0.0"
"@livekit/react-native-webrtc@npm:^144.1.0-beta.2":
version: 144.1.0-beta.2
resolution: "@livekit/react-native-webrtc@npm:144.1.0-beta.2"
dependencies:
base64-js: "npm:1.5.1"
debug: "npm:4.3.4"
peerDependencies:
react-native: ">=0.60.0"
checksum: 10/d97454e8bcb5ab0ae98e8a9d134f8486276b12bdf993052b5b01ac3e8da375e63bb66c84061201bd4499266afbe383a9a065c85c19b0734d659bc21fcf156508
checksum: 10/9177743b36a79d95be83c6f2fb6fd8d924593fc75577ea57536445af980a1fa32389f0187f8168cee6d51089457223913d9e5149d4406521de5674918fcef77e
languageName: node
linkType: hard

Expand Down Expand Up @@ -3587,7 +3587,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.0.0"
"@livekit/react-native-webrtc": "npm:^144.1.0-beta.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
8 changes: 7 additions & 1 deletion example/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { AppRegistry } from 'react-native';
import App from './src/App';
import { name as appName } from './app.json';
import { registerGlobals, setLogLevel } from '@livekit/react-native';
import {
registerGlobals,
setLogLevel,
setupIOSAudioManagement,
} from '@livekit/react-native';
import { LogLevel } from 'livekit-client';
import { setupErrorLogHandler } from './src/utils/ErrorLogHandler';
import { setupCallService } from './src/callservice/CallService';
Expand All @@ -16,3 +20,5 @@ setupCallService();
// Required React-Native setup for app
registerGlobals();
AppRegistry.registerComponent(appName, () => App);

setupIOSAudioManagement();
16 changes: 8 additions & 8 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PODS:
- hermes-engine (0.82.0):
- hermes-engine/Pre-built (= 0.82.0)
- hermes-engine/Pre-built (0.82.0)
- livekit-react-native (2.9.8):
- livekit-react-native (2.10.1):
- boost
- DoubleConversion
- fast_float
Expand Down Expand Up @@ -37,9 +37,9 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- livekit-react-native-webrtc (144.0.0):
- livekit-react-native-webrtc (144.1.0-beta.2):
- React-Core
- WebRTC-SDK (= 144.7559.01)
- WebRTC-SDK (= 144.7559.04)
- 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.01)
- WebRTC-SDK (144.7559.04)
- Yoga (0.0.0)

DEPENDENCIES:
Expand Down Expand Up @@ -2790,9 +2790,9 @@ SPEC CHECKSUMS:
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
glog: 5683914934d5b6e4240e497e0f4a3b42d1854183
hermes-engine: 8642d8f14a548ab718ec112e9bebdfdd154138b5
livekit-react-native: 16923c9c9cdf21c68cbac52f9a5222c9f05c2f06
livekit-react-native-webrtc: a9a45c67543105a40192b144809513e5ab266d0a
RCT-Folly: 59ec0ac1f2f39672a0c6e6cecdd39383b764646f
livekit-react-native: d3bef98b710d5f0fb6ad1c7734c954ddde910150
livekit-react-native-webrtc: 6fc2ff1df5af82d1adb25828ba14a90380a2073e
RCT-Folly: 846fda9475e61ec7bcbf8a3fe81edfcaeb090669
RCTDeprecation: f17e2ebc07876ca9ab8eb6e4b0a4e4647497ae3a
RCTRequired: e2c574c1b45231f7efb0834936bd609d75072b63
RCTTypeSafety: c693294e3993056955c3010eb1ebc574f1fcded6
Expand Down Expand Up @@ -2862,7 +2862,7 @@ SPEC CHECKSUMS:
RNCAsyncStorage: 01e4301688a611936e3644746ffe3325d3181952
RNScreens: 0bbf16c074ae6bb1058a7bf2d1ae017f4306797c
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
WebRTC-SDK: ab9b5319e458c2bfebdc92b3600740da35d5630d
WebRTC-SDK: ac5965a3cc2c258973466e3b1739ab0308bab0d0
Yoga: 689c8e04277f3ad631e60fe2a08e41d411daf8eb

PODFILE CHECKSUM: 7d332edcb240dc52396452a215395fe8f04521c6
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.0.0",
"@livekit/react-native-webrtc": "^144.1.0-beta.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
3 changes: 0 additions & 3 deletions example/src/RoomPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
useTracks,
type TrackReferenceOrPlaceholder,
AndroidAudioTypePresets,
useIOSAudioManagement,
useRNE2EEManager,
} from '@livekit/react-native';
import { Platform } from 'react-native';
Expand Down Expand Up @@ -106,8 +105,6 @@ const RoomView = ({ navigation, e2ee }: RoomViewProps) => {
return () => {};
}, [room, e2ee]);

useIOSAudioManagement(room, true);

// Setup room listeners
useEffect(() => {
room.registerTextStreamHandler('lk.chat', async (reader, participant) => {
Expand Down
4 changes: 4 additions & 0 deletions ios/LiveKitReactNativeModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ public class LivekitReactNativeModule: RCTEventEmitter {
super.init()
let config = RTCAudioSessionConfiguration()
config.category = AVAudioSession.Category.playAndRecord.rawValue
#if swift(>=6.2)
config.categoryOptions = [.allowAirPlay, .allowBluetoothHFP, .allowBluetoothA2DP, .defaultToSpeaker]
#else
config.categoryOptions = [.allowAirPlay, .allowBluetooth, .allowBluetoothA2DP, .defaultToSpeaker]
#endif
config.mode = AVAudioSession.Mode.videoChat.rawValue

RTCAudioSessionConfiguration.setWebRTC(config)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.35.0",
"@livekit/changesets-changelog-github": "^0.0.4",
"@livekit/react-native-webrtc": "^144.0.0",
"@livekit/react-native-webrtc": "^144.1.0-beta.2",
"@react-native/babel-preset": "0.83.0",
"@react-native/eslint-config": "0.83.0",
"@release-it/conventional-changelog": "10.0.1",
Expand All @@ -94,7 +94,7 @@
"typescript": "^5.9.2"
},
"peerDependencies": {
"@livekit/react-native-webrtc": "^144.0.0",
"@livekit/react-native-webrtc": "^144.1.0-beta.2",
"livekit-client": "^2.15.8",
"react": "*",
"react-native": "*"
Expand Down
Loading
Loading