@livekit/react-native 1.4.1 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -37,7 +37,8 @@ Once the `@livekit/react-native-webrtc` dependency is installed, one last step i
37
37
 
38
38
  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:
39
39
 
40
- ```
40
+ #### Java
41
+ ```java
41
42
  import com.livekit.reactnative.LiveKitReactNative;
42
43
  import com.livekit.reactnative.audio.AudioType;
43
44
 
@@ -55,11 +56,30 @@ public class MainApplication extends Application implements ReactApplication {
55
56
  }
56
57
  ```
57
58
 
59
+ Or in your **MainApplication.kt** if you are using RN 0.73+
60
+ #### Kotlin
61
+ ```kotlin
62
+ import com.livekit.reactnative.LiveKitReactNative
63
+ import com.livekit.reactnative.audio.AudioType
64
+
65
+ class MainActivity : ReactActivity() {
66
+ override fun onCreate(savedInstanceState: Bundle?) {
67
+ // Place this above any other RN related initialization
68
+ // When AudioType is omitted, it'll default to CommunicationAudioType
69
+ // use MediaAudioType if user is only consuming audio, and not publishing
70
+ LiveKitReactNative.setup(this, AudioType.CommunicationAudioType())
71
+
72
+ //...
73
+ }
74
+ }
75
+ ```
76
+ ----
77
+
58
78
  ### iOS
59
79
 
60
80
  In your [AppDelegate.m](https://github.com/livekit/client-sdk-react-native/blob/main/example/ios/LivekitReactNativeExample/AppDelegate.mm) file:
61
81
 
62
- ```
82
+ ```objc
63
83
  #import "LivekitReactNative.h"
64
84
 
65
85
  @implementation AppDelegate
@@ -207,9 +227,8 @@ Android screenshare requires a foreground service with type `mediaProjection` to
207
227
  The example app uses [@voximplant/react-native-foreground-service](https://github.com/voximplant/react-native-foreground-service) for this.
208
228
  Ensure that the service is labelled a `mediaProjection` service like so:
209
229
 
210
- ```
211
- <service android:name="com.voximplant.foregroundservice.VIForegroundService"
212
- android:foregroundServiceType="mediaProjection" />
230
+ ```xml
231
+ <service android:name="com.voximplant.foregroundservice.VIForegroundService" android:foregroundServiceType="mediaProjection" />
213
232
  ```
214
233
 
215
234
  Once setup, start the foreground service prior to using screenshare.
@@ -5,6 +5,7 @@
5
5
  // Created by David Liu on 9/4/22.
6
6
  // Copyright © 2022 LiveKit. All rights reserved.
7
7
  //
8
+ #import <React/RCTBridgeModule.h>
8
9
 
9
10
  @interface LivekitReactNative : NSObject <RCTBridgeModule>
10
11
 
@@ -1,4 +1,3 @@
1
- #import <React/RCTBridgeModule.h>
2
1
  #import "AudioUtils.h"
3
2
  #import "LivekitReactNative.h"
4
3
  #import "WebRTCModule.h"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livekit/react-native",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "LiveKit for React Native",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",