react-native-webrtc 111.0.0 → 111.0.1

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.
@@ -2,8 +2,12 @@ name: Android CI
2
2
  on:
3
3
  push:
4
4
  branches: [ master ]
5
+ paths-ignore:
6
+ - '**.md'
5
7
  pull_request:
6
8
  branches: [ master ]
9
+ paths-ignore:
10
+ - '**.md'
7
11
 
8
12
  jobs:
9
13
  android-compile:
@@ -26,4 +30,4 @@ jobs:
26
30
 
27
31
  - name: Compile Android Example
28
32
  run: ./gradlew assembleDebug
29
- working-directory: ./examples/GumTestApp/android
33
+ working-directory: ./examples/GumTestApp/android
@@ -2,8 +2,12 @@ name: iOS CI
2
2
  on:
3
3
  push:
4
4
  branches: [ master ]
5
+ paths-ignore:
6
+ - '**.md'
5
7
  pull_request:
6
8
  branches: [ master ]
9
+ paths-ignore:
10
+ - '**.md'
7
11
 
8
12
  jobs:
9
13
  ios-compile:
package/ISSUE_TEMPLATE.md CHANGED
@@ -1,25 +1,40 @@
1
1
  <!--
2
- If you have a question then please ask it on our community Discourse: https://react-native-webrtc.discourse.group/
3
- otherwise if you wanted to report a bug then you are in the right place!
2
+ If you have any questions then please use our Community Discourse: https://react-native-webrtc.discourse.group/
3
+ Otherwise you are in the right place for reporting bugs.
4
4
 
5
5
  Please include as much information as possible and make the issue title as descriptive as you can.
6
- -->
7
-
8
- #### Expected Behavior
9
-
6
+ But most of all please take your time and explain to the best of your abilities.
10
7
 
8
+ Code samples can be very helpful but even more so if displayed correctly.
9
+ Here is an example of how you can use syntax highlighting.
11
10
 
12
- #### Observed Behavior
11
+ ```javascript
13
12
 
13
+ console.log( 'Hello World' );
14
14
 
15
+ ```
15
16
 
16
- #### Steps to reproduce the issue
17
+ More info can be found over here.
18
+ https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#syntax-highlighting
19
+ -->
17
20
 
21
+ #### Expected Behavior:
22
+ <!--
23
+ Explain what you expect to happen.
24
+ -->
18
25
 
26
+ #### Observed Behavior:
27
+ <!--
28
+ Explain what is actually happening.
29
+ -->
19
30
 
20
- #### Platform Information
31
+ #### Steps to reproduce the issue:
32
+ <!--
33
+ Explain how the issue can be reproduced.
34
+ If we manage to reproduce the issue then it is more likely to be addressed in an update.
35
+ -->
21
36
 
37
+ #### Platform Information
22
38
  * **React Native Version**:
23
- * **Plugin Version**:
24
- * **OS**: <!-- Android / iOS / macOS / Web / Expo -->
25
- * **OS Version**:
39
+ * **WebRTC Module Version**:
40
+ * **Platform OS + Version**: <!-- Android / iOS / macOS / Web / Expo -->
package/README.md CHANGED
@@ -10,27 +10,35 @@ A WebRTC module for React Native.
10
10
 
11
11
  ## Feature Overview
12
12
 
13
- | | Android | iOS | macOS | Windows* | Web* | Expo* |
13
+ | | Android | iOS | macOS* | Windows* | Web* | Expo* |
14
14
  | :-: | :-------: | :---: | :-----: | :--------: | :----: | :-----: |
15
- | Audio/Video | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | - | :heavy_check_mark: | :heavy_check_mark: |
16
- | Data Channels | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | - | :heavy_check_mark: | :heavy_check_mark: |
17
- | Screen Capture | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | - | :heavy_check_mark: | :heavy_check_mark: |
15
+ | Audio/Video | :heavy_check_mark: | :heavy_check_mark: | - | - | :heavy_check_mark: | :heavy_check_mark: |
16
+ | Data Channels | :heavy_check_mark: | :heavy_check_mark: | - | - | :heavy_check_mark: | :heavy_check_mark: |
17
+ | Screen Capture | :heavy_check_mark: | :heavy_check_mark: | - | - | :heavy_check_mark: | :heavy_check_mark: |
18
18
  | Plan B | - | - | - | - | - | - |
19
- | Unified Plan* | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | - | :heavy_check_mark: | :heavy_check_mark: |
19
+ | Unified Plan* | :heavy_check_mark: | :heavy_check_mark: | - | - | :heavy_check_mark: | :heavy_check_mark: |
20
+ | Simulcast* | :heavy_check_mark: | :heavy_check_mark: | - | - | :heavy_check_mark: | :heavy_check_mark: |
21
+
22
+ > **macOS** - We don't currently actively support macOS at this time.
23
+ Support might return in the future.
20
24
 
21
25
  > **Windows** - We don't currently support the [react-native-windows](https://github.com/microsoft/react-native-windows) platform at this time.
22
26
  Anyone interested in getting the ball rolling? We're open to contributions.
23
27
 
24
- > **Web** - The [react-native-webrtc-web-shim](https://github.com/react-native-webrtc/react-native-webrtc-web-shim) project provides a shim for [react-native-web](https://github.com/necolas/react-native-web) support.
25
- Which will allow you to use [(almost)](https://github.com/react-native-webrtc/react-native-webrtc-web-shim/tree/main#setup) the exact same code in your [react-native-web](https://github.com/necolas/react-native-web) project as you would with [react-native](https://reactnative.dev/) directly.
28
+ > **Web** - The [react-native-webrtc-web-shim](https://github.com/react-native-webrtc/react-native-webrtc-web-shim) project provides a shim for [react-native-web](https://github.com/necolas/react-native-web) support. Which will allow you to use [(almost)](https://github.com/react-native-webrtc/react-native-webrtc-web-shim/tree/main#setup) the exact same code in your [react-native-web](https://github.com/necolas/react-native-web) project as you would with [react-native](https://reactnative.dev/) directly.
29
+
30
+ > **Expo** - As this module includes native code it is not available in the [Expo Go](https://expo.dev/client) app by default.
31
+ However you can get things working via the [expo-dev-client](https://docs.expo.dev/development/getting-started/) library and out-of-tree [config-plugins/react-native-webrtc](https://github.com/expo/config-plugins/tree/master/packages/react-native-webrtc) package.
26
32
 
27
- > **Expo** - Sadly this module is not available in the [Expo Go](https://expo.dev/client) app by default due to including much needed native code. However you can get things working via the [expo-dev-client](https://docs.expo.dev/development/getting-started/) library and out-of-tree [config-plugins/react-native-webrtc](https://github.com/expo/config-plugins/tree/master/packages/react-native-webrtc) package.
33
+ > **Unified Plan** - As of version 106.0.0 Unified Plan is the only supported mode.
34
+ Those still in need of Plan B will need to use an older release.
28
35
 
29
- > **Unified Plan** - As of version 106.0.0 Unified Plan is the only supported mode. Those still in need of Plan B can use and old release.
36
+ > **Simulcast** - As of version 111.0.0 Simulcast is now possible with ease.
37
+ Software encode/decode factories have been enabled by default.
30
38
 
31
39
  ## WebRTC Revision
32
40
 
33
- * Currently used revision: [M106](https://github.com/jitsi/webrtc/tree/M106)
41
+ * Currently used revision: [M111](https://github.com/jitsi/webrtc/tree/M111)
34
42
  * Supported architectures
35
43
  * Android: armeabi-v7a, arm64-v8a, x86, x86_64
36
44
  * iOS: arm64, x86_64
@@ -43,6 +51,7 @@ Don't forget to follow platform guides below to cover any extra required steps.
43
51
 
44
52
  **npm:** `npm install react-native-webrtc --save`
45
53
  **yarn:** `yarn add react-native-webrtc`
54
+ **pnpm:** `pnpm install react-native-webrtc`
46
55
 
47
56
  ## Guides
48
57
 
@@ -5,12 +5,12 @@ def safeExtGet(prop, fallback) {
5
5
  }
6
6
 
7
7
  android {
8
- compileSdkVersion safeExtGet('compileSdkVersion', 23)
8
+ compileSdkVersion safeExtGet('compileSdkVersion', 24)
9
9
  buildToolsVersion safeExtGet('buildToolsVersion', "23.0.1")
10
10
 
11
11
  defaultConfig {
12
- minSdkVersion safeExtGet('minSdkVersion', 19)
13
- targetSdkVersion safeExtGet('targetSdkVersion', 23)
12
+ minSdkVersion safeExtGet('minSdkVersion', 24)
13
+ targetSdkVersion safeExtGet('targetSdkVersion', 24)
14
14
  versionCode 1
15
15
  versionName "1.0"
16
16
  }
@@ -173,12 +173,21 @@ public class WebRTCModule extends ReactContextBaseJavaModule {
173
173
  iceServersArray = map.getArray("iceServers");
174
174
  }
175
175
  List<PeerConnection.IceServer> iceServers = createIceServers(iceServersArray);
176
+
176
177
  PeerConnection.RTCConfiguration conf = new PeerConnection.RTCConfiguration(iceServers);
178
+ conf.sdpSemantics = PeerConnection.SdpSemantics.UNIFIED_PLAN;
177
179
 
178
180
  // Required for perfect negotiation.
179
181
  conf.enableImplicitRollback = true;
180
182
 
181
- conf.sdpSemantics = PeerConnection.SdpSemantics.UNIFIED_PLAN;
183
+ // Enable GCM ciphers.
184
+ CryptoOptions cryptoOptions = CryptoOptions.builder()
185
+ .setEnableGcmCryptoSuites(true)
186
+ .setEnableAes128Sha1_32CryptoCipher(false)
187
+ .setEnableEncryptedRtpHeaderExtensions(false)
188
+ .setRequireFrameEncryption(false)
189
+ .createCryptoOptions();
190
+ conf.cryptoOptions = cryptoOptions;
182
191
 
183
192
  if (map == null) {
184
193
  return conf;
@@ -88,11 +88,17 @@
88
88
 
89
89
  + (nonnull RTCConfiguration *)RTCConfiguration:(id)json {
90
90
  RTCConfiguration *config = [[RTCConfiguration alloc] init];
91
+ config.sdpSemantics = RTCSdpSemanticsUnifiedPlan;
91
92
 
92
93
  // Required for perfect negotiation.
93
94
  config.enableImplicitRollback = YES;
94
95
 
95
- config.sdpSemantics = RTCSdpSemanticsUnifiedPlan;
96
+ // Enable GCM ciphers.
97
+ RTCCryptoOptions *cryptoOptions = [[RTCCryptoOptions alloc] initWithSrtpEnableGcmCryptoSuites:YES
98
+ srtpEnableAes128Sha1_32CryptoCipher:NO
99
+ srtpEnableEncryptedRtpHeaderExtensions:NO
100
+ sframeRequireFrameEncryption:NO];
101
+ config.cryptoOptions = cryptoOptions;
96
102
 
97
103
  if (!json) {
98
104
  return config;
@@ -75,7 +75,7 @@
75
75
  VideoCaptureController *vcc = (VideoCaptureController *)videoTrack.captureController;
76
76
  AVCaptureDeviceFormat *format = vcc.selectedFormat;
77
77
  CMVideoDimensions dimensions = CMVideoFormatDescriptionGetDimensions(format.formatDescription);
78
- settings = @{@"height" : @(dimensions.height), @"width" : @(dimensions.width), @"frameRate" : @(3)};
78
+ settings = @{@"height" : @(dimensions.height), @"width" : @(dimensions.width), @"frameRate" : @(30)};
79
79
  }
80
80
  }
81
81
 
@@ -218,7 +218,7 @@ RCT_EXPORT_METHOD(getUserMedia
218
218
  VideoCaptureController *vcc = (VideoCaptureController *)videoTrack.captureController;
219
219
  AVCaptureDeviceFormat *format = vcc.selectedFormat;
220
220
  CMVideoDimensions dimensions = CMVideoFormatDescriptionGetDimensions(format.formatDescription);
221
- settings = @{@"height" : @(dimensions.height), @"width" : @(dimensions.width), @"frameRate" : @(3)};
221
+ settings = @{@"height" : @(dimensions.height), @"width" : @(dimensions.width), @"frameRate" : @(30)};
222
222
  }
223
223
 
224
224
  [tracks addObject:@{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-webrtc",
3
- "version": "111.0.0",
3
+ "version": "111.0.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/react-native-webrtc/react-native-webrtc.git"
@@ -32,7 +32,7 @@
32
32
  "scripts": {
33
33
  "lint": "eslint --max-warnings 0 . && tsc --noEmit",
34
34
  "prepare": "husky install && bob build",
35
- "format": "clang-format -i ios/RCTWebRTC/* android/src/main/java/com/oney/WebRTCModule/*.java android/src/main/java/com/oney/WebRTCModule/videoEffects/*.java android/src/main/java/com/oney/WebRTCModule/webrtcutils/*.java"
35
+ "format": "tools/format.sh"
36
36
  },
37
37
  "bugs": {
38
38
  "url": "https://github.com/react-native-webrtc/react-native-webrtc/issues"
@@ -0,0 +1,6 @@
1
+ #!/bin/bash
2
+
3
+ #set -x
4
+
5
+ exec git ls-files | grep -e "\(\.java\|\.h\|\.m\)$" | grep -v examples | xargs clang-format -i
6
+