You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+54-5Lines changed: 54 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
9
9
<!--END_BANNER_IMAGE-->
10
10
11
-
# livekit-react-native
11
+
# React Native client SDK for LiveKit
12
12
13
13
<!--BEGIN_DESCRIPTION-->
14
14
Use this SDK to add realtime video, audio and data features to your React Native app. By connecting to <ahref="https://livekit.io/">LiveKit</a> Cloud or a self-hosted server, you can quickly build applications such as multi-modal AI, live streaming, or video calls with just a few lines of code.
@@ -43,9 +43,12 @@ Once the `@livekit/react-native-webrtc` dependency is installed, one last step i
43
43
44
44
### Android
45
45
46
+
<details>
47
+
48
+
<summary>Java</summary>
49
+
46
50
In your [MainApplication.java](https://github.com/livekit/client-sdk-react-native/blob/main/example/android/app/src/main/java/com/example/livekitreactnative/MainApplication.java) file:
47
51
48
-
#### Java
49
52
```java
50
53
importcom.livekit.reactnative.LiveKitReactNative;
51
54
importcom.livekit.reactnative.audio.AudioType;
@@ -64,8 +67,14 @@ public class MainApplication extends Application implements ReactApplication {
64
67
}
65
68
```
66
69
67
-
Or in your **MainApplication.kt** if you are using RN 0.73+
68
-
#### Kotlin
70
+
</details>
71
+
72
+
<details>
73
+
74
+
<summary>Kotlin</summary>
75
+
76
+
In your **MainApplication.kt** file:
77
+
69
78
```kotlin
70
79
importcom.livekit.reactnative.LiveKitReactNative
71
80
importcom.livekit.reactnative.audio.AudioType
@@ -81,10 +90,15 @@ class MainApplication : Application, ReactApplication() {
81
90
}
82
91
}
83
92
```
84
-
----
93
+
94
+
</details>
85
95
86
96
### iOS
87
97
98
+
<details>
99
+
100
+
<summary>Objective-C</summary>
101
+
88
102
In your [AppDelegate.m](https://github.com/livekit/client-sdk-react-native/blob/main/example/ios/LivekitReactNativeExample/AppDelegate.mm) file:
89
103
90
104
```objc
@@ -108,6 +122,41 @@ In your [AppDelegate.m](https://github.com/livekit/client-sdk-react-native/blob/
108
122
}
109
123
```
110
124
125
+
</details>
126
+
127
+
<details>
128
+
129
+
<summary>Swift</summary>
130
+
131
+
In your **AppDelegate.swift** file:
132
+
```swift
133
+
import livekit_react_native
134
+
import livekit_react_native_webrtc
135
+
136
+
@main
137
+
class AppDelegate: UIResponder, UIApplicationDelegate {
// Place this above any other RN related initialization
144
+
LivekitReactNative.setup()
145
+
146
+
// Uncomment the following lines if you want to use the camera in the background
147
+
// Requires voip background mode and iOS 18+.
148
+
149
+
// let options = WebRTCModuleOptions.sharedInstance()
150
+
// options.enableMultitaskingCameraAccess = true
151
+
152
+
// ...
153
+
}
154
+
}
155
+
156
+
```
157
+
158
+
</details>
159
+
111
160
### Expo
112
161
113
162
LiveKit is available on Expo through development builds. You can find our Expo plugin and setup instructions [here](https://github.com/livekit/client-sdk-react-native-expo-plugin).
0 commit comments