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

Update `@livekit/react-native-webrtc` to 150.2.0, which renames its native classes so it can be installed in the same app as other react-native-webrtc forks.

Update both packages together: this release doesn't build against earlier `@livekit/react-native-webrtc` versions, and earlier releases of this package don't build against 150.2.0. Expo users also need to update the [Expo plugin](https://github.com/livekit/client-sdk-react-native-expo-plugin).

If your app uses any of these native names, switch to the new ones:
- iOS: classes and their headers gain an `LKRN` prefix. The Objective-C setup imports `WebRTCModuleOptions.h` in `AppDelegate`; change it to `#import "LKRNWebRTCModuleOptions.h"`. Use `LKRNWebRTCModuleOptions` in place of `WebRTCModuleOptions`, in Swift too.
- iOS screen sharing: open the broadcast picker with `NativeModules.LKRNScreenCapturePickerViewManager.show(reactTag)` instead of `NativeModules.ScreenCapturePickerViewManager.show(reactTag)`.
- Android: `com.oney.WebRTCModule.*` becomes `io.livekit.reactnative.webrtc.*`. Class names are unchanged, so `WebRTCModuleOptions` is now `io.livekit.reactnative.webrtc.WebRTCModuleOptions`.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ In your [AppDelegate.m](https://github.com/livekit/client-sdk-react-native/blob/

```objc
#import "LivekitReactNative.h"
#import "WebRTCModuleOptions.h"
#import "LKRNWebRTCModuleOptions.h"

@implementation AppDelegate

Expand All @@ -166,7 +166,7 @@ In your [AppDelegate.m](https://github.com/livekit/client-sdk-react-native/blob/
// Uncomment the following lines if you want to use the camera in the background
// Requires voip background mode and iOS 18+.

// WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance];
// LKRNWebRTCModuleOptions *options = [LKRNWebRTCModuleOptions sharedInstance];
// options.enableMultitaskingCameraAccess = YES;

//...
Expand Down Expand Up @@ -197,7 +197,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Uncomment the following lines if you want to use the camera in the background
// Requires voip background mode and iOS 18+.

// let options = WebRTCModuleOptions.sharedInstance()
// let options = LKRNWebRTCModuleOptions.sharedInstance()
// options.enableMultitaskingCameraAccess = true

// ...
Expand Down Expand Up @@ -469,7 +469,7 @@ const screenCapturePickerView = Platform.OS === 'ios' && (
const startBroadcast = async () => {
if (Platform.OS === 'ios') {
const reactTag = findNodeHandle(screenCaptureRef.current);
await NativeModules.ScreenCapturePickerViewManager.show(reactTag);
await NativeModules.LKRNScreenCapturePickerViewManager.show(reactTag);
room.localParticipant.setScreenShareEnabled(true);
} else {
room.localParticipant.setScreenShareEnabled(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import com.livekit.reactnative.audio.processing.AudioRecordSamplesDispatcher
import com.livekit.reactnative.audio.processing.CustomAudioProcessingController
import com.livekit.reactnative.video.CustomVideoDecoderFactory
import com.livekit.reactnative.video.CustomVideoEncoderFactory
import com.oney.WebRTCModule.WebRTCModuleOptions
import io.livekit.reactnative.webrtc.WebRTCModuleOptions
import livekit.org.webrtc.audio.JavaAudioDeviceModule
import java.util.concurrent.Callable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import com.livekit.reactnative.audio.processing.AudioSinkManager
import com.livekit.reactnative.audio.processing.AudioSinkProcessor
import com.livekit.reactnative.audio.processing.MultibandVolumeProcessor
import com.livekit.reactnative.audio.processing.VolumeProcessor
import com.oney.WebRTCModule.WebRTCModuleOptions
import io.livekit.reactnative.webrtc.WebRTCModuleOptions
import livekit.org.webrtc.audio.WebRtcAudioTrackHelper
import java.lang.Thread.sleep
import kotlin.concurrent.thread
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.livekit.reactnative.audio.processing

import com.facebook.react.bridge.ReactContext
import com.livekit.reactnative.LiveKitReactNative
import com.oney.WebRTCModule.WebRTCModule
import io.livekit.reactnative.webrtc.WebRTCModule
import livekit.org.webrtc.AudioTrack
import livekit.org.webrtc.AudioTrackSink
import java.util.Collections
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.livekit.reactnative.video

import com.oney.WebRTCModule.webrtcutils.SoftwareVideoDecoderFactoryProxy
import io.livekit.reactnative.webrtc.webrtcutils.SoftwareVideoDecoderFactoryProxy
import livekit.org.webrtc.EglBase
import livekit.org.webrtc.SoftwareVideoDecoderFactory
import livekit.org.webrtc.VideoCodecInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.livekit.reactnative.video

import com.oney.WebRTCModule.webrtcutils.SoftwareVideoEncoderFactoryProxy
import io.livekit.reactnative.webrtc.webrtcutils.SoftwareVideoEncoderFactoryProxy
import livekit.org.webrtc.EglBase
import livekit.org.webrtc.SoftwareVideoEncoderFactory
import livekit.org.webrtc.VideoCodecInfo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.livekit.reactnative.video

import android.util.Log
import com.oney.WebRTCModule.webrtcutils.SoftwareVideoEncoderFactoryProxy
import io.livekit.reactnative.webrtc.webrtcutils.SoftwareVideoEncoderFactoryProxy
import livekit.org.webrtc.EglBase
import livekit.org.webrtc.HardwareVideoEncoderFactory
import livekit.org.webrtc.SimulcastVideoEncoderFactory
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.livekit.reactnative.video

import com.oney.WebRTCModule.EglUtils
import io.livekit.reactnative.webrtc.EglUtils
import livekit.org.webrtc.VideoCodecInfo
import livekit.org.webrtc.VideoDecoder
import livekit.org.webrtc.VideoDecoderFactory
Expand Down
8 changes: 4 additions & 4 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 (3.1.0):
- livekit-react-native (3.1.1):
- boost
- DoubleConversion
- fast_float
Expand Down Expand Up @@ -37,7 +37,7 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- livekit-react-native-webrtc (150.1.1):
- livekit-react-native-webrtc (150.2.0):
- LiveKitWebRTC (= 150.7871.04)
- React-Core
- LiveKitWebRTC (150.7871.04)
Expand Down Expand Up @@ -2693,8 +2693,8 @@ SPEC CHECKSUMS:
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
glog: 5683914934d5b6e4240e497e0f4a3b42d1854183
hermes-engine: 273e30e7fb618279934b0b95ffab60ecedb7acf5
livekit-react-native: 14ac72df2d99165dd445086aadffe564c6a4726c
livekit-react-native-webrtc: 9673903dcaa66f01f4344a9924aec43b790a24a5
livekit-react-native: 3974c9e4cd85b98bed8ba6ae896201081faa2050
livekit-react-native-webrtc: 8f2e63436ce31345acc0bc19cd63542a0cd65198
LiveKitWebRTC: 273ccc71c520e9cf6f28ff42e402940b71e3e34d
RCT-Folly: 846fda9475e61ec7bcbf8a3fe81edfcaeb090669
RCTDeprecation: f17e2ebc07876ca9ab8eb6e4b0a4e4647497ae3a
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": "^150.1.1",
"@livekit/react-native-webrtc": "^150.2.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:^150.1.1":
version: 150.1.1
resolution: "@livekit/react-native-webrtc@npm:150.1.1"
"@livekit/react-native-webrtc@npm:^150.2.0":
version: 150.2.0
resolution: "@livekit/react-native-webrtc@npm:150.2.0"
dependencies:
base64-js: "npm:1.5.1"
debug: "npm:4.3.4"
peerDependencies:
react-native: ">=0.60.0"
checksum: 10/5eb2c5fa796d89d65538d8d70fddcea48fa036aec33b5247e36c0e07d89163c2e815adf8185fb32fdfccd048b73fc3edb47e936ba9faa5aa6b6b0a9aa4d059e0
checksum: 10/8597477ee6c1647aa752ce8666e36c30b33d879c39c05a0a1f6d5723e3d949edb46bd88dd2c619dedf2b8b438d6831bf7cbcb8031aad65dd19eb991a58d61dcb
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:^150.1.1"
"@livekit/react-native-webrtc": "npm:^150.2.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
2 changes: 1 addition & 1 deletion example/ios/LivekitReactNativeExample/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
LivekitReactNative.setup()
let options = WebRTCModuleOptions.sharedInstance()
let options = LKRNWebRTCModuleOptions.sharedInstance()

// Optional for debugging WebRTC issues.
// options.loggingSeverity = .info
Expand Down
8 changes: 4 additions & 4 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 (3.1.0):
- livekit-react-native (3.1.1):
- boost
- DoubleConversion
- fast_float
Expand Down Expand Up @@ -37,7 +37,7 @@ PODS:
- ReactCommon/turbomodule/core
- SocketRocket
- Yoga
- livekit-react-native-webrtc (150.1.1):
- livekit-react-native-webrtc (150.2.0):
- LiveKitWebRTC (= 150.7871.04)
- React-Core
- LiveKitWebRTC (150.7871.04)
Expand Down Expand Up @@ -2791,8 +2791,8 @@ SPEC CHECKSUMS:
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
glog: 5683914934d5b6e4240e497e0f4a3b42d1854183
hermes-engine: 273e30e7fb618279934b0b95ffab60ecedb7acf5
livekit-react-native: 14ac72df2d99165dd445086aadffe564c6a4726c
livekit-react-native-webrtc: 9673903dcaa66f01f4344a9924aec43b790a24a5
livekit-react-native: 3974c9e4cd85b98bed8ba6ae896201081faa2050
livekit-react-native-webrtc: 8f2e63436ce31345acc0bc19cd63542a0cd65198
LiveKitWebRTC: 273ccc71c520e9cf6f28ff42e402940b71e3e34d
RCT-Folly: 59ec0ac1f2f39672a0c6e6cecdd39383b764646f
RCTDeprecation: f17e2ebc07876ca9ab8eb6e4b0a4e4647497ae3a
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": "^150.1.1",
"@livekit/react-native-webrtc": "^150.2.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
2 changes: 1 addition & 1 deletion example/src/RoomPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ const RoomView = ({ navigation, e2ee }: RoomViewProps) => {
const startBroadcast = async () => {
if (Platform.OS === 'ios') {
const reactTag = findNodeHandle(screenCaptureRef.current);
await NativeModules.ScreenCapturePickerViewManager.show(reactTag);
await NativeModules.LKRNScreenCapturePickerViewManager.show(reactTag);
localParticipant.setScreenShareEnabled(true);
} else {
localParticipant.setScreenShareEnabled(true);
Expand Down
4 changes: 2 additions & 2 deletions ios/LiveKitReactNativeModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class LivekitReactNativeModule: RCTEventEmitter {
public static func setup() {
let videoEncoderFactory = LKRTCDefaultVideoEncoderFactory()
let simulcastVideoEncoderFactory = LKRTCVideoEncoderFactorySimulcast(primary: videoEncoderFactory, fallback: videoEncoderFactory)
let options = WebRTCModuleOptions.sharedInstance()
let options = LKRNWebRTCModuleOptions.sharedInstance()
options.videoEncoderFactory = simulcastVideoEncoderFactory
options.audioProcessingModule = LKAudioProcessingManager.sharedInstance().audioProcessingModule
}
Expand Down Expand Up @@ -250,7 +250,7 @@ public class LivekitReactNativeModule: RCTEventEmitter {

@objc(setDefaultAudioTrackVolume:)
public func setDefaultAudioTrackVolume(_ volume: NSNumber) -> Any? {
let options = WebRTCModuleOptions.sharedInstance()
let options = LKRNWebRTCModuleOptions.sharedInstance()
options.defaultTrackVolume = volume.doubleValue

return nil
Expand Down
4 changes: 2 additions & 2 deletions ios/LivekitReactNative-Bridging-Header.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#import "WebRTCModule.h"
#import "WebRTCModule+RTCMediaStream.h"
#import "LKRNWebRTCModule.h"
#import "LKRNWebRTCModule+RTCMediaStream.h"
8 changes: 4 additions & 4 deletions ios/LivekitReactNative.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "WebRTCModule.h"
#import "WebRTCModuleOptions.h"
#import "LKRNWebRTCModule.h"
#import "LKRNWebRTCModuleOptions.h"
#import "LivekitReactNative.h"
#import "LKAudioProcessingManager.h"

Expand All @@ -8,11 +8,11 @@ @implementation LivekitReactNative
+(void)setup {
LKRTCDefaultVideoEncoderFactory *videoEncoderFactory = [[LKRTCDefaultVideoEncoderFactory alloc] init];
LKRTCVideoEncoderFactorySimulcast *simulcastVideoEncoderFactory = [[LKRTCVideoEncoderFactorySimulcast alloc] initWithPrimary:videoEncoderFactory fallback:videoEncoderFactory];
WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance];
LKRNWebRTCModuleOptions *options = [LKRNWebRTCModuleOptions sharedInstance];
options.videoEncoderFactory = simulcastVideoEncoderFactory;
options.audioProcessingModule = LKAudioProcessingManager.sharedInstance.audioProcessingModule;

// WebRTCModule only applies its own default field trials when fieldTrials is
// LKRNWebRTCModule 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 = @{
Expand Down
2 changes: 1 addition & 1 deletion ios/LivekitReactNativeModule.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import <React/RCTBridgeModule.h>
#import <React/RCTEventEmitter.h>
#import "WebRTCModule.h"
#import "LKRNWebRTCModule.h"

@interface RCT_EXTERN_MODULE(LivekitReactNativeModule, RCTEventEmitter)

Expand Down
4 changes: 2 additions & 2 deletions ios/audio/AudioRendererManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class AudioRendererManager: NSObject {

@objc
public func attach(renderer: LKRTCAudioRenderer, pcId: NSNumber, trackId: String) {
let webrtcModule = self.bridge.module(for: WebRTCModule.self) as! WebRTCModule
let webrtcModule = self.bridge.module(for: LKRNWebRTCModule.self) as! LKRNWebRTCModule
guard let track = webrtcModule.track(forId: trackId, pcId: pcId) as? LKRTCAudioTrack
else {
lklog("couldn't find audio track: pcId: \(pcId), trackId: \(trackId)")
Expand All @@ -55,7 +55,7 @@ public class AudioRendererManager: NSObject {

@objc
public func detach(renderer: LKRTCAudioRenderer, pcId: NSNumber, trackId: String) {
let webrtcModule = self.bridge.module(for: WebRTCModule.self) as! WebRTCModule
let webrtcModule = self.bridge.module(for: LKRNWebRTCModule.self) as! LKRNWebRTCModule
guard let track = webrtcModule.track(forId: trackId, pcId: pcId) as? LKRTCAudioTrack
else {
lklog("couldn't find audio track: pcId: \(pcId), trackId: \(trackId)")
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": "^150.1.1",
"@livekit/react-native-webrtc": "^150.2.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": "^150.1.1",
"@livekit/react-native-webrtc": "^150.2.0",
"livekit-client": "^2.20.0",
"react": "*",
"react-native": "*"
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3612,15 +3612,15 @@ __metadata:
languageName: node
linkType: hard

"@livekit/react-native-webrtc@npm:^150.1.1":
version: 150.1.1
resolution: "@livekit/react-native-webrtc@npm:150.1.1"
"@livekit/react-native-webrtc@npm:^150.2.0":
version: 150.2.0
resolution: "@livekit/react-native-webrtc@npm:150.2.0"
dependencies:
base64-js: "npm:1.5.1"
debug: "npm:4.3.4"
peerDependencies:
react-native: ">=0.60.0"
checksum: 10/5eb2c5fa796d89d65538d8d70fddcea48fa036aec33b5247e36c0e07d89163c2e815adf8185fb32fdfccd048b73fc3edb47e936ba9faa5aa6b6b0a9aa4d059e0
checksum: 10/8597477ee6c1647aa752ce8666e36c30b33d879c39c05a0a1f6d5723e3d949edb46bd88dd2c619dedf2b8b438d6831bf7cbcb8031aad65dd19eb991a58d61dcb
languageName: node
linkType: hard

Expand All @@ -3635,7 +3635,7 @@ __metadata:
"@livekit/changesets-changelog-github": "npm:^0.0.4"
"@livekit/components-react": "npm:^2.9.17"
"@livekit/mutex": "npm:^1.1.1"
"@livekit/react-native-webrtc": "npm:^150.1.1"
"@livekit/react-native-webrtc": "npm:^150.2.0"
"@react-native/babel-preset": "npm:0.83.0"
"@react-native/eslint-config": "npm:0.83.0"
"@types/fastestsmallesttextencoderdecoder": "npm:^1.0.0"
Expand All @@ -3662,7 +3662,7 @@ __metadata:
web-streams-polyfill: "npm:^4.3.0"
well-known-symbols: "npm:^4.1.0"
peerDependencies:
"@livekit/react-native-webrtc": ^150.1.1
"@livekit/react-native-webrtc": ^150.2.0
livekit-client: ^2.20.0
react: "*"
react-native: "*"
Expand Down Expand Up @@ -9539,7 +9539,7 @@ __metadata:
"@babel/core": "npm:^7.25.2"
"@babel/preset-env": "npm:^7.25.3"
"@babel/runtime": "npm:^7.25.0"
"@livekit/react-native-webrtc": "npm:^150.1.1"
"@livekit/react-native-webrtc": "npm:^150.2.0"
"@react-native-async-storage/async-storage": "npm:^1.17.10"
"@react-native-community/cli": "npm:20.0.0"
"@react-native-community/cli-platform-android": "npm:20.0.0"
Expand Down
Loading