Releases: livekit/client-sdk-react-native
Releases · livekit/client-sdk-react-native
Release 2.0.2
Release 2.0.1
Release 1.4.3
Release 1.4.1
Release 1.4.0
Release 1.3.0
Release 1.2.0
Release 1.1.2
1.1.2 (2023-06-12)
Features
This release adds simple setup methods to take care of the native code setup required as of v1.1.0.
Android
In your MainApplication.java file:
import com.livekit.reactnative.LiveKitReactNative;
public class MainApplication extends Application implements ReactApplication {
@Override
public void onCreate() {
// Place this above any other RN related initialization
LiveKitReactNative.setup();
//...
}
}
iOS
In your AppDelegate.m file:
#import "LivekitReactNative.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Place this above any other RN related initialization
[LivekitReactNative setup];
//...
}
Release 1.1.1
Release 1.1.0
1.1.0 (2023-06-03)
Features
Breaking Changes
This release switches to @livekit/react-native-webrtc
, a forked version of WebRTC which is better equipped to handle simulcast. Replace react-native-webrtc
in your package.json with "@livekit/react-native-webrtc": "^104.0.0"
.
As a part of the switch, you'll need to add code to your MainApplication.java (Android) and AppDelegate.m (iOS) files to support simulcast. New setup methods were introduced in v1.1.2 that simplify this process. Please upgrade the package and see the instructions there.
Android
In your MainApplication.java file:
import com.livekit.reactnative.video.SimulcastVideoEncoderFactoryWrapper;
import com.oney.WebRTCModule.WebRTCModuleOptions;
import com.oney.WebRTCModule.webrtcutils.H264AndSoftwareVideoDecoderFactory;
import org.webrtc.*;
public class MainApplication extends Application implements ReactApplication {
@Override
public void onCreate() {
// Place this above any other RN related initialization
WebRTCModuleOptions options = WebRTCModuleOptions.getInstance();
options.videoEncoderFactory = new SimulcastVideoEncoderFactoryWrapper(null, true, true);
options.videoDecoderFactory = new H264AndSoftwareVideoDecoderFactory(null);
// ...
}
}
iOS
In your AppDelegate.m file:
#import "WebRTCModule.h"
#import "WebRTCModuleOptions.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Place this above any other RN related initialization
RTCDefaultVideoEncoderFactory *videoEncoderFactory = [[RTCDefaultVideoEncoderFactory alloc] init];
RTCVideoEncoderFactorySimulcast *simulcastVideoEncoderFactory =
[[RTCVideoEncoderFactorySimulcast alloc] initWithPrimary:videoEncoderFactory fallback:videoEncoderFactory];
WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance];
options.videoEncoderFactory = simulcastVideoEncoderFactory;
//...
}