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
18 changes: 18 additions & 0 deletions .changeset/bump-webrtc-150.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
'@livekit/react-native': minor
---

Update @livekit/react-native-webrtc to 150.1.0.

iOS: the `LiveKitWebRTC` pod is published to the [livekit/podspecs](https://github.com/livekit/podspecs) spec repo and the CocoaPods trunk. The CocoaPods trunk stops accepting new pods on December 2, 2026, so later `LiveKitWebRTC` versions will only be available from livekit/podspecs. Add both sources to the top of your `ios/Podfile`:

```ruby
source 'https://github.com/livekit/podspecs.git'
source 'https://cdn.cocoapods.org/'
```

Keep the `cdn.cocoapods.org` line: once a `Podfile` lists any `source`, CocoaPods stops using trunk by default, and your other pods still come from there.

Expo users don't need to edit the `Podfile` by hand: version 1.1.0 and later of the [Expo plugin](https://github.com/livekit/client-sdk-react-native-expo-plugin) adds these sources during prebuild.

If `pod install` then reports that it could not find compatible versions for `LiveKitWebRTC`, run `cd ios && pod update LiveKitWebRTC`.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,22 @@ This library depends on `@livekit/react-native-webrtc`, which has additional ins
- [iOS Installation Guide](https://github.com/livekit/react-native-webrtc/blob/master/Documentation/iOSInstallation.md)
- [Android Installation Guide](https://github.com/livekit/react-native-webrtc/blob/master/Documentation/AndroidInstallation.md)

### iOS Podfile

This package depends on the `LiveKitWebRTC` pod, which is published to the
[livekit/podspecs](https://github.com/livekit/podspecs) spec repo and the CocoaPods trunk. The CocoaPods trunk stops accepting new pods on December 2, 2026, so later `LiveKitWebRTC` versions will only be available from livekit/podspecs. Add both sources to the top of your `ios/Podfile`:

```ruby
source 'https://github.com/livekit/podspecs.git'
source 'https://cdn.cocoapods.org/'
```

Keep the `cdn.cocoapods.org` line: once a `Podfile` lists any `source`, CocoaPods stops using
trunk by default, and your other pods still come from there.

Expo users don't need to edit the `Podfile` by hand: version 1.1.0 and later of the
[Expo plugin](https://github.com/livekit/client-sdk-react-native-expo-plugin) adds these sources during prebuild.

---

Once the `@livekit/react-native-webrtc` dependency is installed, one last step is needed to finish the installation:
Expand Down Expand Up @@ -496,6 +512,20 @@ To fix this, you can either:
- use another package manager, like npm
- use [yarn-deduplicate](https://www.npmjs.com/package/yarn-deduplicate) to deduplicate dependencies

#### CocoaPods could not find compatible versions for pod "LiveKitWebRTC"

This usually happens after upgrading `@livekit/react-native-webrtc`. The error may also say the
matching specs "required a higher minimum deployment target", which is misleading.

Make sure both [Podfile sources](#ios-podfile) are in your `ios/Podfile`, then run:

```sh
cd ios && pod update LiveKitWebRTC
```

You may also see a `Found multiple specifications for LiveKitWebRTC` warning. It is harmless:
some versions are published to both livekit/podspecs and CocoaPods trunk, and the two are identical.

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,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-prefixed:144.7559.15'
api 'io.github.webrtc-sdk:android-prefixed:150.7871.01'
implementation "io.livekit:noise:2.0.0"
implementation project(':livekit_react-native-webrtc')
implementation "androidx.annotation:annotation:1.9.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ import java.util.concurrent.Callable

object LiveKitReactNative {

// WARP: fold the DTLS handshake into the ICE handshake. Field trials are read
// when the PeerConnectionFactory is created, so this can only be set here, not
// from JS. The format is "Key/Value/" repeated, so this concatenates onto
// whatever the app already set.
private const val WARP_FIELD_TRIALS = "WebRTC-IceHandshakeDtls/Enabled/"


private var audioType: AudioType = AudioType.CommunicationAudioType()

Expand Down Expand Up @@ -62,6 +68,7 @@ object LiveKitReactNative {

this.audioType = audioType
val options = WebRTCModuleOptions.getInstance()
options.fieldTrials = (options.fieldTrials ?: "") + WARP_FIELD_TRIALS
options.videoEncoderFactory = CustomVideoEncoderFactory(null, true, true)
options.videoDecoderFactory = CustomVideoDecoderFactory()
options.enableMediaProjectionService = true
Expand Down
6 changes: 6 additions & 0 deletions ci/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ require Pod::Executable.execute_command('node', ['-p',
{paths: [process.argv[1]]},
)', __dir__]).strip

# CocoaPods trunk stops accepting new pods on 2026-12-02, so later LiveKitWebRTC
# releases will only be published to livekit/podspecs. It is listed first so that
# versions published to both sources resolve from livekit/podspecs.
source 'https://github.com/livekit/podspecs.git'
source 'https://cdn.cocoapods.org/'

platform :ios, min_ios_version_supported
prepare_react_native_project!

Expand Down
19 changes: 10 additions & 9 deletions ci/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PODS:
- hermes-engine (0.82.1):
- hermes-engine/Pre-built (= 0.82.1)
- hermes-engine/Pre-built (0.82.1)
- livekit-react-native (2.12.0):
- livekit-react-native (3.0.0):
- boost
- DoubleConversion
- fast_float
Expand Down Expand Up @@ -37,10 +37,10 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- livekit-react-native-webrtc (144.2.0):
- LiveKitWebRTC (= 144.7559.15)
- livekit-react-native-webrtc (150.1.0):
- LiveKitWebRTC (= 150.7871.03)
- React-Core
- LiveKitWebRTC (144.7559.15)
- LiveKitWebRTC (150.7871.03)
- RCT-Folly (2024.11.18.00):
- boost
- DoubleConversion
Expand Down Expand Up @@ -2525,8 +2525,9 @@ DEPENDENCIES:
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
trunk:
https://github.com/livekit/podspecs.git:
- LiveKitWebRTC
trunk:
- SocketRocket

EXTERNAL SOURCES:
Expand Down Expand Up @@ -2692,9 +2693,9 @@ SPEC CHECKSUMS:
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
glog: 5683914934d5b6e4240e497e0f4a3b42d1854183
hermes-engine: 273e30e7fb618279934b0b95ffab60ecedb7acf5
livekit-react-native: 27001a5d9454cc8d27894317425aa511801154e2
livekit-react-native-webrtc: 3cd501a18d7ee8b95c21764dd8502201a0bc4cb3
LiveKitWebRTC: 6abc86e190722e223fc870284547b6f229288c46
livekit-react-native: 7a050816c891b58f073d4f7bda57ed7fe536a168
livekit-react-native-webrtc: c239a23e695baefc7d32fe10ee44bcf08ff21755
LiveKitWebRTC: 3dc23b085876a52d67b8dad78a9f7cfaba2bc0f7
RCT-Folly: 846fda9475e61ec7bcbf8a3fe81edfcaeb090669
RCTDeprecation: f17e2ebc07876ca9ab8eb6e4b0a4e4647497ae3a
RCTRequired: e2c574c1b45231f7efb0834936bd609d75072b63
Expand Down Expand Up @@ -2764,6 +2765,6 @@ SPEC CHECKSUMS:
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
Yoga: 689c8e04277f3ad631e60fe2a08e41d411daf8eb

PODFILE CHECKSUM: a7f2ec66657cfb895ebb19b63b9033e6419495f9
PODFILE CHECKSUM: fae84db1685e71fd0607bd8465ec5be5b1bb18e6

COCOAPODS: 1.16.2
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.2.0",
"@livekit/react-native-webrtc": "^150.1.0",
"@react-native/new-app-screen": "0.82.1",
"livekit-client": "^2.20.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.2.0":
version: 144.2.0
resolution: "@livekit/react-native-webrtc@npm:144.2.0"
"@livekit/react-native-webrtc@npm:^150.1.0":
version: 150.1.0
resolution: "@livekit/react-native-webrtc@npm:150.1.0"
dependencies:
base64-js: "npm:1.5.1"
debug: "npm:4.3.4"
peerDependencies:
react-native: ">=0.60.0"
checksum: 10/fb2db76db47d976cd1ebfff16eef7ba49123a6b0c7af76c6cde671889276c7a5c8c6ed43d4402cf7412ff9905dbf4d986eaf029dd0190cd1bb6fb1897075dd72
checksum: 10/e4c557edfac166492b7c01afbc2a839144280dfa8d49852d8c627400629a6d5b4bc0c77bf74aebebcf49ddc9df604dc7c606eded8292efaf7c73016dda0f80fa
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.2.0"
"@livekit/react-native-webrtc": "npm:^150.1.0"
"@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
6 changes: 6 additions & 0 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ require Pod::Executable.execute_command('node', ['-p',
{paths: [process.argv[1]]},
)', __dir__]).strip

# CocoaPods trunk stops accepting new pods on 2026-12-02, so later LiveKitWebRTC
# releases will only be published to livekit/podspecs. It is listed first so that
# versions published to both sources resolve from livekit/podspecs.
source 'https://github.com/livekit/podspecs.git'
source 'https://cdn.cocoapods.org/'

platform :ios, min_ios_version_supported
prepare_react_native_project!

Expand Down
19 changes: 10 additions & 9 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.1):
- hermes-engine/Pre-built (= 0.82.1)
- hermes-engine/Pre-built (0.82.1)
- livekit-react-native (2.12.0):
- livekit-react-native (3.0.0):
- boost
- DoubleConversion
- fast_float
Expand Down Expand Up @@ -37,10 +37,10 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- livekit-react-native-webrtc (144.2.0):
- LiveKitWebRTC (= 144.7559.15)
- livekit-react-native-webrtc (150.1.0):
- LiveKitWebRTC (= 150.7871.03)
- React-Core
- LiveKitWebRTC (144.7559.15)
- LiveKitWebRTC (150.7871.03)
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.
- RCT-Folly (2024.11.18.00):
- boost
- DoubleConversion
Expand Down Expand Up @@ -2617,8 +2617,9 @@ DEPENDENCIES:
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
trunk:
https://github.com/livekit/podspecs.git:
- LiveKitWebRTC
trunk:
- SocketRocket

EXTERNAL SOURCES:
Expand Down Expand Up @@ -2790,9 +2791,9 @@ SPEC CHECKSUMS:
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
glog: 5683914934d5b6e4240e497e0f4a3b42d1854183
hermes-engine: 273e30e7fb618279934b0b95ffab60ecedb7acf5
livekit-react-native: 27001a5d9454cc8d27894317425aa511801154e2
livekit-react-native-webrtc: 3cd501a18d7ee8b95c21764dd8502201a0bc4cb3
LiveKitWebRTC: 6abc86e190722e223fc870284547b6f229288c46
livekit-react-native: 7a050816c891b58f073d4f7bda57ed7fe536a168
livekit-react-native-webrtc: c239a23e695baefc7d32fe10ee44bcf08ff21755
LiveKitWebRTC: 3dc23b085876a52d67b8dad78a9f7cfaba2bc0f7
RCT-Folly: 59ec0ac1f2f39672a0c6e6cecdd39383b764646f
RCTDeprecation: f17e2ebc07876ca9ab8eb6e4b0a4e4647497ae3a
RCTRequired: e2c574c1b45231f7efb0834936bd609d75072b63
Expand Down Expand Up @@ -2865,6 +2866,6 @@ SPEC CHECKSUMS:
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
Yoga: 689c8e04277f3ad631e60fe2a08e41d411daf8eb

PODFILE CHECKSUM: a921a659e37cd7dfb12da519493e10c9f38400a1
PODFILE CHECKSUM: 893f25f2ed3e362f3ce16f22689b673a1e41ffab

COCOAPODS: 1.16.2
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.2.0",
"@livekit/react-native-webrtc": "^150.1.0",
"@react-native-async-storage/async-storage": "^1.17.10",
"@react-navigation/native": "^7.1.18",
"@react-navigation/native-stack": "^7.3.27",
Expand Down
9 changes: 9 additions & 0 deletions ios/LivekitReactNative.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ +(void)setup {
WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance];
options.videoEncoderFactory = simulcastVideoEncoderFactory;
options.audioProcessingModule = LKAudioProcessingManager.sharedInstance.audioProcessingModule;

// WebRTCModule only applies its own default field trials when fieldTrials is
// nil, so carry the dual-sim fix over ourselves.
// https://bugs.chromium.org/p/webrtc/issues/detail?id=10966
options.fieldTrials = @{
kLKRTCFieldTrialUseNWPathMonitor : kLKRTCFieldTrialEnabledValue,
// WARP: fold the DTLS handshake into the ICE handshake.
kLKRTCFieldTrialIceHandshakeDtlsKey : kLKRTCFieldTrialEnabledValue,
};
}

@end
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.2.0",
"@livekit/react-native-webrtc": "^150.1.0",
"@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.2.0",
"@livekit/react-native-webrtc": "^150.1.0",
"livekit-client": "^2.20.0",
"react": "*",
"react-native": "*"
Expand Down
21 changes: 21 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import './polyfills/MediaRecorderShim';

import {
registerGlobals as webrtcRegisterGlobals,
RTCPeerConnection,
AudioDeviceModule,
AudioEngineMuteMode,
AudioEngineAvailability,
Expand Down Expand Up @@ -63,6 +64,7 @@ export function registerGlobals(options?: RegisterGlobalsOptions) {
};

webrtcRegisterGlobals();
shimSctpSnap();
if (opts.autoConfigureAudioSession) {
setupIOSAudioManagement();
}
Expand All @@ -76,6 +78,25 @@ export function registerGlobals(options?: RegisterGlobalsOptions) {
setupNativeEvents();
}

function shimSctpSnap() {
// The SCTP half of WARP. livekit-client owns the RTCConfiguration it hands to
// `new RTCPeerConnection`, so there's no way to reach it from here. Default the
// flag on in the global constructor instead; an explicit `enableSctpSnap` in
// the app's rtcConfig still wins.
class SctpSnapPeerConnection extends RTCPeerConnection {
constructor(
configuration?: ConstructorParameters<typeof RTCPeerConnection>[0]
) {
super({ enableSctpSnap: true, ...configuration });
}
}

// Cast rather than `declare global`, which would ship in the .d.ts and clash
// with whatever DOM types the consuming app has.
(globalThis as unknown as { RTCPeerConnection: unknown }).RTCPeerConnection =
SctpSnapPeerConnection;
}

function livekitRegisterGlobals() {
let lkGlobal: LiveKitReactNativeInfo = {
platform: Platform.OS,
Expand Down
1 change: 1 addition & 0 deletions typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"java",
"kotlin",
"objc",
"ruby",
"swift",
"xml"
]
Expand Down
Loading
Loading