@voltkit-rtc/react-native 0.1.4 → 0.1.6
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/CHANGELOG.md +31 -1
- package/README.md +56 -17
- package/android/src/main/java/com/voltkit/rtc/reactnative/RtcConfig.kt +6 -4
- package/lib/commonjs/globals.js +19 -0
- package/lib/commonjs/globals.js.map +1 -1
- package/lib/commonjs/native.js +1 -1
- package/lib/module/globals.js +19 -0
- package/lib/module/globals.js.map +1 -1
- package/lib/module/native.js +1 -1
- package/lib/typescript/commonjs/globals.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +1 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/native.d.ts +1 -1
- package/lib/typescript/module/globals.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +1 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/native.d.ts +1 -1
- package/package.json +4 -4
- package/plugin/build/android.js +1 -1
- package/plugin/build/options.d.ts +5 -1
- package/plugin/build/options.js +1 -1
- package/src/globals.ts +17 -0
- package/src/index.ts +1 -0
- package/src/native.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,38 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.6
|
|
4
|
+
|
|
5
|
+
2026-11-06. WebRTC's own echo canceller by default on Android. Same peer dependencies as 0.1.5. Build the app again after
|
|
6
|
+
upgrading: the setting is read from the manifest when the app starts, and the version check reads this package's version.
|
|
7
|
+
|
|
8
|
+
- **WebRTC's echo canceller (AEC3) and noise suppressor by default** (`android.hardwareEchoCancellation` now defaults to
|
|
9
|
+
`false`; meta-data `in.voltkit.rtc.HW_AEC`). On Android, while WebRTC uses the phone's own canceller it switches its own
|
|
10
|
+
off, so the result depended on the phone: on an Oppo on the loudspeaker the person on the other phone heard themselves
|
|
11
|
+
with distortion, in this SDK and the Flutter one (a developer's finding, 2026-11-06). Agora and ZEGO tell developers to
|
|
12
|
+
use the SDK's canceller for such phones; theirs keep one, WebRTC does not. AEC3 is the canceller browsers use, and the
|
|
13
|
+
one this SDK's `react-native-webrtc` build carries. To keep the phone's, as before 0.1.6, set
|
|
14
|
+
`android: { hardwareEchoCancellation: true }` in the plugin options (or `in.voltkit.rtc.HW_AEC` to `true`). iOS is
|
|
15
|
+
unchanged: it uses the system's voice processing.
|
|
16
|
+
|
|
17
|
+
## 0.1.5
|
|
18
|
+
|
|
19
|
+
2026-11-05. A developer's findings on 0.1.4, and the round of 2026-11-05 (decisions D2 and D10). Peer dependencies
|
|
20
|
+
`@voltkit-rtc/client >=0.9.17 <0.10.0` and `@voltkit-rtc/react ^0.1.5`. The native code is the same, but build the app again
|
|
21
|
+
after upgrading: its version check reads this package's version. This round ran the unit tests, the typecheck, the build
|
|
22
|
+
and the docs' examples; not the emulator.
|
|
23
|
+
|
|
24
|
+
- **`react-native-webrtc`'s debug logs are off in release builds** (a developer's finding; D10). It turns them on as it
|
|
25
|
+
loads, for every build: 31 `rn-webrtc:*:DEBUG` lines for one join, in a shipped app's log. They carry connection and
|
|
26
|
+
track ids, no session description or key. Outside `__DEV__` the SDK turns them off right after loading it, and leaves
|
|
27
|
+
its warnings and errors on; a development build keeps them all. The `overrides` and `debug.disable()` workaround can go.
|
|
28
|
+
- **A name that goes with the join**: `<VoltkitProvider metadata={{ name: 'Asha' }}>` and `useRoom().connect({ metadata })`, from
|
|
29
|
+
`@voltkit-rtc/react` 0.1.5.
|
|
30
|
+
- From the client 0.9.17: names kept through reconnects, `client.identity` and `client.role`, `setAudioQuality('hd')` giving
|
|
31
|
+
one answer, and `not-connected` or `unpublished` for a switch your own `close()` or `unpublish()` ended.
|
|
32
|
+
|
|
3
33
|
## 0.1.4
|
|
4
34
|
|
|
5
|
-
|
|
35
|
+
Published 2026-11-02. The SDK round of 2026-11-01: the fixes are the client's (0.9.16), which this package
|
|
6
36
|
runs; peer dependencies `@voltkit-rtc/client >=0.9.16 <0.10.0` and `@voltkit-rtc/react ^0.1.4`. The native code is the
|
|
7
37
|
same, but build the app again after upgrading: its version check reads this package's version. This round ran the unit
|
|
8
38
|
tests, the typecheck, the build and the docs' examples (the steps of `make sdk-check-react-native`); not the emulator.
|
package/README.md
CHANGED
|
@@ -78,8 +78,8 @@ library, and under Expo's `tsconfig.base` alike.
|
|
|
78
78
|
| React Native | 0.82 or newer, with the New Architecture; tested with 0.88.0 and Hermes |
|
|
79
79
|
| React | 19.1 or newer |
|
|
80
80
|
| react-native-webrtc | 155.0.1 or a later 155.x |
|
|
81
|
-
| `@voltkit-rtc/client` | 0.9.
|
|
82
|
-
| `@voltkit-rtc/react` | 0.1.
|
|
81
|
+
| `@voltkit-rtc/client` | 0.9.17 or a later 0.9.x |
|
|
82
|
+
| `@voltkit-rtc/react` | 0.1.5 or a later 0.1.x |
|
|
83
83
|
| Android | minSdk 24 (Android 7.0), react-native-webrtc's minimum |
|
|
84
84
|
| Expo | SDK 58 or newer, in a development build; not Expo Go |
|
|
85
85
|
| iOS | Preview: see [iOS preview](#ios-preview) |
|
|
@@ -134,7 +134,7 @@ you edit no native file:
|
|
|
134
134
|
| `android.callServiceCamera` | `false` | Adds the `camera` type and `FOREGROUND_SERVICE_CAMERA`, for an app that keeps the camera on in the background (`background={{ pauseCamera: false }}`) |
|
|
135
135
|
| `android.screenShare` | `false` | Turns on react-native-webrtc's screen-capture service for [screen sharing](#screen-sharing), with `FOREGROUND_SERVICE_MEDIA_PROJECTION` and the `mediaProjection` type on the call service |
|
|
136
136
|
| `android.audioMode` | `"communication"` | `"media"` for an app whose users only listen: see [Audio routing](#audio-routing) |
|
|
137
|
-
| `android.hardwareEchoCancellation` | `
|
|
137
|
+
| `android.hardwareEchoCancellation` | `false` | `false` (the default from 0.1.6): WebRTC's own echo canceller and noise suppressor (AEC3). `true`: the phone's own, where it has them, as before 0.1.6. See [Echo on Android](#echo-on-android) |
|
|
138
138
|
| `ios.backgroundAudio` | `true` | Adds `audio` to `UIBackgroundModes`, so a call keeps its sound in the background |
|
|
139
139
|
| `ios.voip` | `false` | Adds `voip` to `UIBackgroundModes`, for an app that integrates CallKit itself |
|
|
140
140
|
|
|
@@ -451,6 +451,7 @@ its own.
|
|
|
451
451
|
| `wsUrl` | `string` | the room's WebSocket URL, from your backend with the token |
|
|
452
452
|
| `token` | `string` | a room token your backend minted |
|
|
453
453
|
| `connect` | `boolean` | connect the client when it is idle; default `true`. With `false`, call `useRoom().connect()` yourself |
|
|
454
|
+
| `metadata` | object | your display metadata (a name, an avatar), sent with the join whoever starts it, so everyone hears it on `participantJoined`. It stays through reconnects; later, `client.setMetadata` changes it (0.1.5) |
|
|
454
455
|
| `onConnected` | `(result: JoinResult) => void` | after every successful join: the first, and each automatic reconnect |
|
|
455
456
|
| `onError` | `(error: Error) => void` | every `error` event (warnings included), a failed connect, a token the session refused, a call service that could not start, and missing native code |
|
|
456
457
|
| `onClosed` | `(reason: ClosedReason) => void` | the session ended for good: `left`, `kicked`, `room-closed`, `gave-up` or `replaced` |
|
|
@@ -740,11 +741,12 @@ export function OutputPicker() {
|
|
|
740
741
|
tried again until the user picks it, a device is added, or the call ends.
|
|
741
742
|
- **No Bluetooth permission** is needed: the routing goes through Android's
|
|
742
743
|
`AudioManager`.
|
|
743
|
-
- **Echo
|
|
744
|
-
suppressor
|
|
745
|
-
|
|
746
|
-
`
|
|
747
|
-
|
|
744
|
+
- **Echo cancellation.** From 0.1.6, WebRTC's own echo canceller and noise
|
|
745
|
+
suppressor (AEC3, the one browsers use), not the phone's built-in ones, which
|
|
746
|
+
some phones cannot run well on the loudspeaker.
|
|
747
|
+
`android: { hardwareEchoCancellation: true }` in the Expo plugin's options (or
|
|
748
|
+
the `in.voltkit.rtc.HW_AEC` meta-data, below) brings the phone's back. See
|
|
749
|
+
[Echo on Android](#echo-on-android).
|
|
748
750
|
- **Apps whose users only listen** can set the audio mode to `media` (the
|
|
749
751
|
plugin's `android.audioMode`, or the `in.voltkit.rtc.AUDIO_MODE` meta-data):
|
|
750
752
|
sound plays at the media volume and on Bluetooth's high-quality profile, with
|
|
@@ -764,8 +766,8 @@ In a React Native app without Expo, the audio settings are meta-data in
|
|
|
764
766
|
<application>
|
|
765
767
|
<!-- communication (calls and audio rooms) or media (listen-only apps) -->
|
|
766
768
|
<meta-data android:name="in.voltkit.rtc.AUDIO_MODE" android:value="communication" />
|
|
767
|
-
<!--
|
|
768
|
-
<meta-data android:name="in.voltkit.rtc.HW_AEC" android:value="
|
|
769
|
+
<!-- false: WebRTC's own echo canceller and noise suppressor (from 0.1.6); true: the phone's own, where it has them -->
|
|
770
|
+
<meta-data android:name="in.voltkit.rtc.HW_AEC" android:value="false" />
|
|
769
771
|
<!-- react-native-webrtc's screen-capture service: see Screen sharing -->
|
|
770
772
|
<meta-data android:name="in.voltkit.rtc.SCREEN_SHARE" android:value="false" />
|
|
771
773
|
</application>
|
|
@@ -1337,6 +1339,13 @@ react-native-webrtc's own error when its native code is not in the app. The app
|
|
|
1337
1339
|
was not built again after `npm install`: run `npx react-native run-android`, or
|
|
1338
1340
|
make a new development build. Expo Go cannot load it at all.
|
|
1339
1341
|
|
|
1342
|
+
### `rn-webrtc:*:DEBUG` lines in the log
|
|
1343
|
+
|
|
1344
|
+
react-native-webrtc's own debug logs, which it turns on as it loads. From 0.1.5
|
|
1345
|
+
they are off in release builds, with its warnings and errors left on, and stay
|
|
1346
|
+
on in development builds, where they help. They carry connection and track ids
|
|
1347
|
+
only.
|
|
1348
|
+
|
|
1340
1349
|
### "needs a development build"
|
|
1341
1350
|
|
|
1342
1351
|
The SDK's `media-unavailable` error when native code is missing: `data.reason`
|
|
@@ -1425,12 +1434,42 @@ The emulator has only the loudspeaker, so `useAudioOutput().outputs` lists one
|
|
|
1425
1434
|
output and `setSpeakerphoneOn(false)` has nowhere else to go. Test the earpiece
|
|
1426
1435
|
and headsets on a phone.
|
|
1427
1436
|
|
|
1428
|
-
### Echo on
|
|
1437
|
+
### Echo on Android
|
|
1438
|
+
|
|
1439
|
+
From 0.1.6 the SDK uses WebRTC's own echo canceller and noise suppressor (AEC3,
|
|
1440
|
+
the one browsers use) on Android, not the phone's built-in ones. While WebRTC
|
|
1441
|
+
uses a phone's canceller it switches its own off, and some phones' cancellers
|
|
1442
|
+
do not cope with the loudspeaker: the person on the other phone hears their own
|
|
1443
|
+
voice back, even in another room. An app on 0.1.5 or earlier that sees this
|
|
1444
|
+
should upgrade and build again.
|
|
1445
|
+
|
|
1446
|
+
To use the phone's own canceller instead, as before 0.1.6, set it in the Expo
|
|
1447
|
+
plugin's options, in `app.json` or `app.config.js`:
|
|
1448
|
+
|
|
1449
|
+
```json
|
|
1450
|
+
{
|
|
1451
|
+
"expo": {
|
|
1452
|
+
"plugins": [
|
|
1453
|
+
["@voltkit-rtc/react-native", { "android": { "hardwareEchoCancellation": true } }]
|
|
1454
|
+
]
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
```
|
|
1458
|
+
|
|
1459
|
+
Then make a new build of the app (`npx expo run:android`, or a new EAS build):
|
|
1460
|
+
the setting is read when the app starts, so reloading the JavaScript does not
|
|
1461
|
+
apply it. In a React Native app without Expo, set the meta-data in
|
|
1462
|
+
`AndroidManifest.xml` instead, and build again:
|
|
1463
|
+
|
|
1464
|
+
```xml
|
|
1465
|
+
<meta-data android:name="in.voltkit.rtc.HW_AEC" android:value="true" />
|
|
1466
|
+
```
|
|
1429
1467
|
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1468
|
+
An Expo app uses the plugin option, not a hand edit: `expo prebuild` writes the
|
|
1469
|
+
manifest again, and the edit is lost. Test either choice on the phone that
|
|
1470
|
+
echoed and on another before you ship it. A headset or the earpiece on the
|
|
1471
|
+
phone that causes the echo also stops it. Where echo comes from, including two
|
|
1472
|
+
phones in one room: https://voltkit.in/docs/troubleshooting#echo.
|
|
1434
1473
|
|
|
1435
1474
|
### Google Play rejects the app for 16 KB page sizes
|
|
1436
1475
|
|
|
@@ -1497,8 +1536,8 @@ Bluetooth routing tested in unit tests, not on hardware.** Tested with:
|
|
|
1497
1536
|
| React | 19.3.0 |
|
|
1498
1537
|
| react-native-webrtc | 155.0.1 (WebRTC `org.jitsi:webrtc` 155.0.1) |
|
|
1499
1538
|
| Expo | SDK 58 (`expo` 58.0.19), development build, R8-minified release build |
|
|
1500
|
-
| `@voltkit-rtc/client` | 0.9.
|
|
1501
|
-
| `@voltkit-rtc/react` | 0.1.
|
|
1539
|
+
| `@voltkit-rtc/client` | 0.9.17 (0.1.5: unit tests, the typecheck, the build and the docs' examples; the emulator run is 0.1.3's on 0.9.15) |
|
|
1540
|
+
| `@voltkit-rtc/react` | 0.1.5 |
|
|
1502
1541
|
| Android | the Android emulator (a Pixel 10 Pro AVD, x86_64, API 37.1, Google Play image); earpiece and Bluetooth routing in unit tests, not on hardware |
|
|
1503
1542
|
| iOS | not tested: preview |
|
|
1504
1543
|
|
|
@@ -25,8 +25,10 @@ internal enum class AudioMode {
|
|
|
25
25
|
* (plan §5.3), as the Expo config plugin writes them or a hand-written manifest gives them:
|
|
26
26
|
*
|
|
27
27
|
* <meta-data android:name="in.voltkit.rtc.AUDIO_MODE" android:value="communication" /> communication | media
|
|
28
|
-
* <meta-data android:name="in.voltkit.rtc.HW_AEC" android:value="
|
|
29
|
-
* canceller and noise suppressor
|
|
28
|
+
* <meta-data android:name="in.voltkit.rtc.HW_AEC" android:value="false" /> the handset's own echo
|
|
29
|
+
* canceller and noise suppressor;
|
|
30
|
+
* false (the default from 0.1.6):
|
|
31
|
+
* WebRTC's own (AEC3)
|
|
30
32
|
* <meta-data android:name="in.voltkit.rtc.SCREEN_SHARE" android:value="false" /> react-native-webrtc's
|
|
31
33
|
* screen-share service
|
|
32
34
|
*
|
|
@@ -34,7 +36,7 @@ internal enum class AudioMode {
|
|
|
34
36
|
*/
|
|
35
37
|
internal data class RtcConfig(
|
|
36
38
|
val audioMode: AudioMode = AudioMode.communication,
|
|
37
|
-
val hardwareEchoCancellation: Boolean =
|
|
39
|
+
val hardwareEchoCancellation: Boolean = false,
|
|
38
40
|
val screenShare: Boolean = false,
|
|
39
41
|
/** What could not be read, with the default used instead; the init provider logs it. */
|
|
40
42
|
val problems: List<String> = emptyList(),
|
|
@@ -55,7 +57,7 @@ internal data class RtcConfig(
|
|
|
55
57
|
}
|
|
56
58
|
return RtcConfig(
|
|
57
59
|
audioMode = mode,
|
|
58
|
-
hardwareEchoCancellation = flag(meta(HW_AEC), HW_AEC, default =
|
|
60
|
+
hardwareEchoCancellation = flag(meta(HW_AEC), HW_AEC, default = false, problems),
|
|
59
61
|
screenShare = flag(meta(SCREEN_SHARE), SCREEN_SHARE, default = false, problems),
|
|
60
62
|
problems = problems,
|
|
61
63
|
)
|
package/lib/commonjs/globals.js
CHANGED
|
@@ -30,9 +30,28 @@ function loadWebRTC() {
|
|
|
30
30
|
if (!webrtcAvailable()) return null;
|
|
31
31
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
32
32
|
loaded = require('react-native-webrtc');
|
|
33
|
+
quietInRelease();
|
|
33
34
|
return loaded;
|
|
34
35
|
}
|
|
35
36
|
|
|
37
|
+
/**
|
|
38
|
+
* react-native-webrtc turns its own debug logs on as it loads, for every build: 31 lines for one join, in a shipped app's
|
|
39
|
+
* log. Outside __DEV__ they go off here, right after, with its warnings and errors left on. Its logger is not among its
|
|
40
|
+
* exports; a later version that moved it only leaves the logs on.
|
|
41
|
+
*/
|
|
42
|
+
function quietInRelease() {
|
|
43
|
+
if (__DEV__) return;
|
|
44
|
+
try {
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
46
|
+
const {
|
|
47
|
+
default: Logger
|
|
48
|
+
} = require('react-native-webrtc/lib/commonjs/Logger');
|
|
49
|
+
Logger.enable('rn-webrtc:*:WARN,rn-webrtc:*:ERROR');
|
|
50
|
+
} catch {
|
|
51
|
+
// Noise, never a reason to stop a call.
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
36
55
|
/**
|
|
37
56
|
* Install react-native-webrtc's WebRTC classes as globals (RTCPeerConnection, MediaStream, ...), which mediasoup-client
|
|
38
57
|
* needs. Runs when the package is imported; calling it again does nothing. Returns false, without throwing, where
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","loaded","registered","webrtcAvailable","NativeModules","WebRTCModule","loadWebRTC","registerVoltkitGlobals","webrtc","registerGlobals","webrtcVersion","pkg","version"],"sourceRoot":"../../src","sources":["globals.ts"],"mappings":";;;;;;;;;AAOA,IAAAA,YAAA,GAAAC,OAAA;AAPA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,IAAIC,MAA2B,GAAG,IAAI;AACtC,IAAIC,UAAU,GAAG,KAAK;;AAEtB;AACO,SAASC,eAAeA,CAAA,EAAY;EACzC,OAAQC,0BAAa,CAA6BC,YAAY,IAAI,IAAI;AACxE;;AAEA;AACO,SAASC,UAAUA,CAAA,EAAwB;EAChD,IAAIL,MAAM,EAAE,OAAOA,MAAM;EACzB,IAAI,CAACE,eAAe,CAAC,CAAC,EAAE,OAAO,IAAI;EACnC;EACAF,MAAM,GAAGD,OAAO,CAAC,qBAAqB,CAAiB;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","loaded","registered","webrtcAvailable","NativeModules","WebRTCModule","loadWebRTC","quietInRelease","__DEV__","default","Logger","enable","registerVoltkitGlobals","webrtc","registerGlobals","webrtcVersion","pkg","version"],"sourceRoot":"../../src","sources":["globals.ts"],"mappings":";;;;;;;;;AAOA,IAAAA,YAAA,GAAAC,OAAA;AAPA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,IAAIC,MAA2B,GAAG,IAAI;AACtC,IAAIC,UAAU,GAAG,KAAK;;AAEtB;AACO,SAASC,eAAeA,CAAA,EAAY;EACzC,OAAQC,0BAAa,CAA6BC,YAAY,IAAI,IAAI;AACxE;;AAEA;AACO,SAASC,UAAUA,CAAA,EAAwB;EAChD,IAAIL,MAAM,EAAE,OAAOA,MAAM;EACzB,IAAI,CAACE,eAAe,CAAC,CAAC,EAAE,OAAO,IAAI;EACnC;EACAF,MAAM,GAAGD,OAAO,CAAC,qBAAqB,CAAiB;EACvDO,cAAc,CAAC,CAAC;EAChB,OAAON,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASM,cAAcA,CAAA,EAAS;EAC9B,IAAIC,OAAO,EAAE;EACb,IAAI;IACF;IACA,MAAM;MAAEC,OAAO,EAAEC;IAAO,CAAC,GAAGV,OAAO,CAAC,yCAAyC,CAAsD;IACnIU,MAAM,CAACC,MAAM,CAAC,oCAAoC,CAAC;EACrD,CAAC,CAAC,MAAM;IACN;EAAA;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,sBAAsBA,CAAA,EAAY;EAChD,IAAIV,UAAU,EAAE,OAAO,IAAI;EAC3B,MAAMW,MAAM,GAAGP,UAAU,CAAC,CAAC;EAC3B,IAAI,CAACO,MAAM,EAAE,OAAO,KAAK;EACzBA,MAAM,CAACC,eAAe,CAAC,CAAC;EACxBZ,UAAU,GAAG,IAAI;EACjB,OAAO,IAAI;AACb;;AAEA;AACO,SAASa,aAAaA,CAAA,EAAkB;EAC7C,IAAI;IACF;IACA,MAAMC,GAAG,GAAGhB,OAAO,CAAC,kCAAkC,CAA0B;IAChF,OAAO,OAAOgB,GAAG,CAACC,OAAO,KAAK,QAAQ,GAAGD,GAAG,CAACC,OAAO,GAAG,IAAI;EAC7D,CAAC,CAAC,MAAM;IACN,OAAO,IAAI;EACb;AACF","ignoreList":[]}
|
package/lib/commonjs/native.js
CHANGED
|
@@ -21,7 +21,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
/** The version of this package: what getDiagnostics() reports, and what the native side was built from. */
|
|
24
|
-
const SDK_VERSION = exports.SDK_VERSION = '0.1.
|
|
24
|
+
const SDK_VERSION = exports.SDK_VERSION = '0.1.6';
|
|
25
25
|
|
|
26
26
|
/** The native module, or null where there is none (iOS, Expo Go, an app not rebuilt). */
|
|
27
27
|
function nativeModule() {
|
package/lib/module/globals.js
CHANGED
|
@@ -22,9 +22,28 @@ export function loadWebRTC() {
|
|
|
22
22
|
if (!webrtcAvailable()) return null;
|
|
23
23
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
24
24
|
loaded = require('react-native-webrtc');
|
|
25
|
+
quietInRelease();
|
|
25
26
|
return loaded;
|
|
26
27
|
}
|
|
27
28
|
|
|
29
|
+
/**
|
|
30
|
+
* react-native-webrtc turns its own debug logs on as it loads, for every build: 31 lines for one join, in a shipped app's
|
|
31
|
+
* log. Outside __DEV__ they go off here, right after, with its warnings and errors left on. Its logger is not among its
|
|
32
|
+
* exports; a later version that moved it only leaves the logs on.
|
|
33
|
+
*/
|
|
34
|
+
function quietInRelease() {
|
|
35
|
+
if (__DEV__) return;
|
|
36
|
+
try {
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
38
|
+
const {
|
|
39
|
+
default: Logger
|
|
40
|
+
} = require('react-native-webrtc/lib/commonjs/Logger');
|
|
41
|
+
Logger.enable('rn-webrtc:*:WARN,rn-webrtc:*:ERROR');
|
|
42
|
+
} catch {
|
|
43
|
+
// Noise, never a reason to stop a call.
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
28
47
|
/**
|
|
29
48
|
* Install react-native-webrtc's WebRTC classes as globals (RTCPeerConnection, MediaStream, ...), which mediasoup-client
|
|
30
49
|
* needs. Runs when the package is imported; calling it again does nothing. Returns false, without throwing, where
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","loaded","registered","webrtcAvailable","WebRTCModule","loadWebRTC","require","registerVoltkitGlobals","webrtc","registerGlobals","webrtcVersion","pkg","version"],"sourceRoot":"../../src","sources":["globals.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,cAAc;AAK5C,IAAIC,MAA2B,GAAG,IAAI;AACtC,IAAIC,UAAU,GAAG,KAAK;;AAEtB;AACA,OAAO,SAASC,eAAeA,CAAA,EAAY;EACzC,OAAQH,aAAa,CAA6BI,YAAY,IAAI,IAAI;AACxE;;AAEA;AACA,OAAO,SAASC,UAAUA,CAAA,EAAwB;EAChD,IAAIJ,MAAM,EAAE,OAAOA,MAAM;EACzB,IAAI,CAACE,eAAe,CAAC,CAAC,EAAE,OAAO,IAAI;EACnC;EACAF,MAAM,GAAGK,OAAO,CAAC,qBAAqB,CAAiB;
|
|
1
|
+
{"version":3,"names":["NativeModules","loaded","registered","webrtcAvailable","WebRTCModule","loadWebRTC","require","quietInRelease","__DEV__","default","Logger","enable","registerVoltkitGlobals","webrtc","registerGlobals","webrtcVersion","pkg","version"],"sourceRoot":"../../src","sources":["globals.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,cAAc;AAK5C,IAAIC,MAA2B,GAAG,IAAI;AACtC,IAAIC,UAAU,GAAG,KAAK;;AAEtB;AACA,OAAO,SAASC,eAAeA,CAAA,EAAY;EACzC,OAAQH,aAAa,CAA6BI,YAAY,IAAI,IAAI;AACxE;;AAEA;AACA,OAAO,SAASC,UAAUA,CAAA,EAAwB;EAChD,IAAIJ,MAAM,EAAE,OAAOA,MAAM;EACzB,IAAI,CAACE,eAAe,CAAC,CAAC,EAAE,OAAO,IAAI;EACnC;EACAF,MAAM,GAAGK,OAAO,CAAC,qBAAqB,CAAiB;EACvDC,cAAc,CAAC,CAAC;EAChB,OAAON,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASM,cAAcA,CAAA,EAAS;EAC9B,IAAIC,OAAO,EAAE;EACb,IAAI;IACF;IACA,MAAM;MAAEC,OAAO,EAAEC;IAAO,CAAC,GAAGJ,OAAO,CAAC,yCAAyC,CAAsD;IACnII,MAAM,CAACC,MAAM,CAAC,oCAAoC,CAAC;EACrD,CAAC,CAAC,MAAM;IACN;EAAA;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAAA,EAAY;EAChD,IAAIV,UAAU,EAAE,OAAO,IAAI;EAC3B,MAAMW,MAAM,GAAGR,UAAU,CAAC,CAAC;EAC3B,IAAI,CAACQ,MAAM,EAAE,OAAO,KAAK;EACzBA,MAAM,CAACC,eAAe,CAAC,CAAC;EACxBZ,UAAU,GAAG,IAAI;EACjB,OAAO,IAAI;AACb;;AAEA;AACA,OAAO,SAASa,aAAaA,CAAA,EAAkB;EAC7C,IAAI;IACF;IACA,MAAMC,GAAG,GAAGV,OAAO,CAAC,kCAAkC,CAA0B;IAChF,OAAO,OAAOU,GAAG,CAACC,OAAO,KAAK,QAAQ,GAAGD,GAAG,CAACC,OAAO,GAAG,IAAI;EAC7D,CAAC,CAAC,MAAM;IACN,OAAO,IAAI;EACb;AACF","ignoreList":[]}
|
package/lib/module/native.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Platform } from 'react-native';
|
|
|
9
9
|
import NativeVoltkitRtc from "./specs/NativeVoltkitRtc.js";
|
|
10
10
|
import { iosUnsupported, logError, nativeMissing } from "./errors.js";
|
|
11
11
|
/** The version of this package: what getDiagnostics() reports, and what the native side was built from. */
|
|
12
|
-
export const SDK_VERSION = '0.1.
|
|
12
|
+
export const SDK_VERSION = '0.1.6';
|
|
13
13
|
|
|
14
14
|
/** The native module, or null where there is none (iOS, Expo Go, an app not rebuilt). */
|
|
15
15
|
export function nativeModule() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../src/globals.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,OAAO,MAAM,CAAC;AAKzC,kEAAkE;AAClE,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,2GAA2G;AAC3G,wBAAgB,UAAU,IAAI,YAAY,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../src/globals.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,OAAO,MAAM,CAAC;AAKzC,kEAAkE;AAClE,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,2GAA2G;AAC3G,wBAAgB,UAAU,IAAI,YAAY,GAAG,IAAI,CAOhD;AAkBD;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAOhD;AAED,wGAAwG;AACxG,wBAAgB,aAAa,IAAI,MAAM,GAAG,IAAI,CAQ7C"}
|
|
@@ -20,5 +20,5 @@ export type { PermissionKind, PermissionStatus, PermissionStatuses, Permissions
|
|
|
20
20
|
export { SDK_VERSION } from './native';
|
|
21
21
|
export { useVoltkitClient, useRoom, useConnectionState, useParticipants, useRemoteTracks, useNetworkQuality, useWalletLow, useVoltkitEvent, useActiveSpeakers, useAudioLevels, useCpuConstrained, useDevices, useIsSpeaking, useMediaWarnings, usePublishFallback, useStreamFallback, } from '@voltkit-rtc/react';
|
|
22
22
|
export type { RoomState, RemoteTrackFilter, WalletLowState } from '@voltkit-rtc/react';
|
|
23
|
-
export type { AudioDeviceType, AudioQuality, CameraFacing, ChatMessage, ClientEvents, ClientOptions, ClientPlatform, ClosedReason, CodecPreference, ConnectionState, DeviceHandlerName, DeviceKind, ErrorCode, JoinResult, LayerCount, LocalMediaState, MediaDevice, MediaPermissions, NetworkQuality, NetworkQualityLevel, ParticipantInfo, PreflightReport, PublishOptions, RemoteTrack, Role, ScreenMode, ScreenPublishOptions, SendMessageOptions, StreamClient, TokenExpiringNotice, TrackSource, UsageLimitNotice, VideoQuality, WalletLowNotice, } from '@voltkit-rtc/client';
|
|
23
|
+
export type { AudioDeviceType, AudioQuality, CameraFacing, ChatMessage, ClientEvents, ClientOptions, ClientPlatform, ClosedReason, CodecPreference, ConnectOptions, ConnectionState, DeviceHandlerName, DeviceKind, ErrorCode, JoinResult, LayerCount, LocalMediaState, MediaDevice, MediaPermissions, NetworkQuality, NetworkQualityLevel, ParticipantInfo, PreflightReport, PublishOptions, RemoteTrack, Role, ScreenMode, ScreenPublishOptions, SendMessageOptions, StreamClient, TokenExpiringNotice, TrackSource, UsageLimitNotice, VideoQuality, WalletLowNotice, } from '@voltkit-rtc/client';
|
|
24
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AACzE,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACvG,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,YAAY,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,UAA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,EAAE,MAAM,UAAU,CAAC;AAGvC,OAAO,EACL,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGvF,YAAY,EACV,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,aAAa,EACb,cAAc,EACd,YAAY,EACZ,eAAe,EACf,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,cAAc,EACd,WAAW,EACX,IAAI,EACJ,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,eAAe,GAChB,MAAM,qBAAqB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { EventSubscription } from 'react-native';
|
|
|
2
2
|
import { type AudioDevice, type Constants, type Spec } from './specs/NativeVoltkitRtc';
|
|
3
3
|
import type { MediaDevice } from '@voltkit-rtc/client';
|
|
4
4
|
/** The version of this package: what getDiagnostics() reports, and what the native side was built from. */
|
|
5
|
-
export declare const SDK_VERSION = "0.1.
|
|
5
|
+
export declare const SDK_VERSION = "0.1.6";
|
|
6
6
|
/** The native module, or null where there is none (iOS, Expo Go, an app not rebuilt). */
|
|
7
7
|
export declare function nativeModule(): Spec | null;
|
|
8
8
|
/** The module's constants, read once: the audio mode, screen sharing, the call service as the manifest declares them. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../src/globals.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,OAAO,MAAM,CAAC;AAKzC,kEAAkE;AAClE,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,2GAA2G;AAC3G,wBAAgB,UAAU,IAAI,YAAY,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../src/globals.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,OAAO,MAAM,CAAC;AAKzC,kEAAkE;AAClE,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,2GAA2G;AAC3G,wBAAgB,UAAU,IAAI,YAAY,GAAG,IAAI,CAOhD;AAkBD;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAOhD;AAED,wGAAwG;AACxG,wBAAgB,aAAa,IAAI,MAAM,GAAG,IAAI,CAQ7C"}
|
|
@@ -20,5 +20,5 @@ export type { PermissionKind, PermissionStatus, PermissionStatuses, Permissions
|
|
|
20
20
|
export { SDK_VERSION } from './native.js';
|
|
21
21
|
export { useVoltkitClient, useRoom, useConnectionState, useParticipants, useRemoteTracks, useNetworkQuality, useWalletLow, useVoltkitEvent, useActiveSpeakers, useAudioLevels, useCpuConstrained, useDevices, useIsSpeaking, useMediaWarnings, usePublishFallback, useStreamFallback, } from '@voltkit-rtc/react';
|
|
22
22
|
export type { RoomState, RemoteTrackFilter, WalletLowState } from '@voltkit-rtc/react';
|
|
23
|
-
export type { AudioDeviceType, AudioQuality, CameraFacing, ChatMessage, ClientEvents, ClientOptions, ClientPlatform, ClosedReason, CodecPreference, ConnectionState, DeviceHandlerName, DeviceKind, ErrorCode, JoinResult, LayerCount, LocalMediaState, MediaDevice, MediaPermissions, NetworkQuality, NetworkQualityLevel, ParticipantInfo, PreflightReport, PublishOptions, RemoteTrack, Role, ScreenMode, ScreenPublishOptions, SendMessageOptions, StreamClient, TokenExpiringNotice, TrackSource, UsageLimitNotice, VideoQuality, WalletLowNotice, } from '@voltkit-rtc/client';
|
|
23
|
+
export type { AudioDeviceType, AudioQuality, CameraFacing, ChatMessage, ClientEvents, ClientOptions, ClientPlatform, ClosedReason, CodecPreference, ConnectOptions, ConnectionState, DeviceHandlerName, DeviceKind, ErrorCode, JoinResult, LayerCount, LocalMediaState, MediaDevice, MediaPermissions, NetworkQuality, NetworkQualityLevel, ParticipantInfo, PreflightReport, PublishOptions, RemoteTrack, Role, ScreenMode, ScreenPublishOptions, SendMessageOptions, StreamClient, TokenExpiringNotice, TrackSource, UsageLimitNotice, VideoQuality, WalletLowNotice, } from '@voltkit-rtc/client';
|
|
24
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAW,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,oBAAiB,CAAC;AACzE,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oBAAiB,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAa,CAAC;AACxC,YAAY,EAAE,2BAA2B,EAAE,MAAM,gBAAa,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAY,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,sBAAmB,CAAC;AACvG,OAAO,EAAE,eAAe,EAAE,MAAM,eAAY,CAAC;AAC7C,YAAY,EAAE,oBAAoB,EAAE,MAAM,eAAY,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,q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M,YAAS,CAAC;AAC/E,YAAY,EAAE,WAAW,EAAE,MAAM,YAAS,CAAC;AAC3C,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,kBAAe,CAAC;AAC/F,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,kBAAe,CAAC;AACvG,OAAO,EAAE,WAAW,EAAE,MAAM,aAAU,CAAC;AAGvC,OAAO,EACL,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGvF,YAAY,EACV,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,aAAa,EACb,cAAc,EACd,YAAY,EACZ,eAAe,EACf,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,cAAc,EACd,WAAW,EACX,IAAI,EACJ,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,eAAe,GAChB,MAAM,qBAAqB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { EventSubscription } from 'react-native';
|
|
|
2
2
|
import { type AudioDevice, type Constants, type Spec } from './specs/NativeVoltkitRtc.js';
|
|
3
3
|
import type { MediaDevice } from '@voltkit-rtc/client';
|
|
4
4
|
/** The version of this package: what getDiagnostics() reports, and what the native side was built from. */
|
|
5
|
-
export declare const SDK_VERSION = "0.1.
|
|
5
|
+
export declare const SDK_VERSION = "0.1.6";
|
|
6
6
|
/** The native module, or null where there is none (iOS, Expo Go, an app not rebuilt). */
|
|
7
7
|
export declare function nativeModule(): Spec | null;
|
|
8
8
|
/** The module's constants, read once: the audio mode, screen sharing, the call service as the manifest declares them. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltkit-rtc/react-native",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "React Native SDK for VoltKit RTC: calls, audio rooms and live video on Android (iOS in preview), with the hooks of @voltkit-rtc/react, background calls, audio routing and an Expo config plugin.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"voltkit",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
77
77
|
"test": "jest",
|
|
78
78
|
"test:plugin": "jest -c plugin/jest.config.js",
|
|
79
|
-
"prepublishOnly": "npm run build && npm test"
|
|
79
|
+
"prepublishOnly": "bash ../scripts/test/docs-sdk-readmes.sh && npm run build && npm test"
|
|
80
80
|
},
|
|
81
81
|
"codegenConfig": {
|
|
82
82
|
"name": "VoltkitRtcSpec",
|
|
@@ -111,8 +111,8 @@
|
|
|
111
111
|
]
|
|
112
112
|
},
|
|
113
113
|
"peerDependencies": {
|
|
114
|
-
"@voltkit-rtc/client": ">=0.9.
|
|
115
|
-
"@voltkit-rtc/react": "^0.1.
|
|
114
|
+
"@voltkit-rtc/client": ">=0.9.17 <0.10.0",
|
|
115
|
+
"@voltkit-rtc/react": "^0.1.5",
|
|
116
116
|
"expo": ">=58",
|
|
117
117
|
"react": ">=19.1.0",
|
|
118
118
|
"react-native": ">=0.82.0",
|
package/plugin/build/android.js
CHANGED
|
@@ -25,7 +25,7 @@ exports.setVoltkitManifest = setVoltkitManifest;
|
|
|
25
25
|
* <uses-feature android:name="android.hardware.microphone" android:required="false" /> with RECORD_AUDIO
|
|
26
26
|
* <application>
|
|
27
27
|
* <meta-data android:name="in.voltkit.rtc.AUDIO_MODE" android:value="communication" /> RtcConfig.kt
|
|
28
|
-
* <meta-data android:name="in.voltkit.rtc.HW_AEC" android:value="
|
|
28
|
+
* <meta-data android:name="in.voltkit.rtc.HW_AEC" android:value="false" />
|
|
29
29
|
* <meta-data android:name="in.voltkit.rtc.SCREEN_SHARE" android:value="false" />
|
|
30
30
|
* <service android:name="com.voltkit.rtc.reactnative.VoltkitCallService" android:exported="false"
|
|
31
31
|
* android:foregroundServiceType="microphone|mediaPlayback" /> VoltkitCallService.kt
|
|
@@ -51,7 +51,11 @@ export interface VoltkitRtcAndroidProps {
|
|
|
51
51
|
* android.blockedPermissions blocks what it needs.
|
|
52
52
|
*/
|
|
53
53
|
screenShare?: boolean;
|
|
54
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* The phone's own echo canceller and noise suppressor, where it has them (meta-data in.voltkit.rtc.HW_AEC). Default false
|
|
56
|
+
* from 0.1.6: WebRTC's own (AEC3, the one browsers use), because WebRTC switches its own off while it uses the phone's and
|
|
57
|
+
* some phones' cancellers do not cope with the loudspeaker. True for the phone's, as before 0.1.6.
|
|
58
|
+
*/
|
|
55
59
|
hardwareEchoCancellation?: boolean;
|
|
56
60
|
}
|
|
57
61
|
export interface VoltkitRtcIosProps {
|
package/plugin/build/options.js
CHANGED
|
@@ -28,7 +28,7 @@ const ANDROID_DEFAULTS = {
|
|
|
28
28
|
callService: true,
|
|
29
29
|
callServiceCamera: false,
|
|
30
30
|
screenShare: false,
|
|
31
|
-
hardwareEchoCancellation:
|
|
31
|
+
hardwareEchoCancellation: false,
|
|
32
32
|
};
|
|
33
33
|
const IOS_DEFAULTS = { backgroundAudio: true, voip: false };
|
|
34
34
|
const TOP_KEYS = ['cameraPermission', 'microphonePermission', 'android', 'ios'];
|
package/src/globals.ts
CHANGED
|
@@ -24,9 +24,26 @@ export function loadWebRTC(): WebRTCModule | null {
|
|
|
24
24
|
if (!webrtcAvailable()) return null;
|
|
25
25
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
26
26
|
loaded = require('react-native-webrtc') as WebRTCModule;
|
|
27
|
+
quietInRelease();
|
|
27
28
|
return loaded;
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
/**
|
|
32
|
+
* react-native-webrtc turns its own debug logs on as it loads, for every build: 31 lines for one join, in a shipped app's
|
|
33
|
+
* log. Outside __DEV__ they go off here, right after, with its warnings and errors left on. Its logger is not among its
|
|
34
|
+
* exports; a later version that moved it only leaves the logs on.
|
|
35
|
+
*/
|
|
36
|
+
function quietInRelease(): void {
|
|
37
|
+
if (__DEV__) return;
|
|
38
|
+
try {
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
40
|
+
const { default: Logger } = require('react-native-webrtc/lib/commonjs/Logger') as { default: { enable(namespaces: string): void } };
|
|
41
|
+
Logger.enable('rn-webrtc:*:WARN,rn-webrtc:*:ERROR');
|
|
42
|
+
} catch {
|
|
43
|
+
// Noise, never a reason to stop a call.
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
30
47
|
/**
|
|
31
48
|
* Install react-native-webrtc's WebRTC classes as globals (RTCPeerConnection, MediaStream, ...), which mediasoup-client
|
|
32
49
|
* needs. Runs when the package is imported; calling it again does nothing. Returns false, without throwing, where
|
package/src/index.ts
CHANGED
package/src/native.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { iosUnsupported, logError, nativeMissing } from './errors';
|
|
|
10
10
|
import type { AudioDeviceType, DeviceKind, MediaDevice } from '@voltkit-rtc/client';
|
|
11
11
|
|
|
12
12
|
/** The version of this package: what getDiagnostics() reports, and what the native side was built from. */
|
|
13
|
-
export const SDK_VERSION = '0.1.
|
|
13
|
+
export const SDK_VERSION = '0.1.6';
|
|
14
14
|
|
|
15
15
|
/** The native module, or null where there is none (iOS, Expo Go, an app not rebuilt). */
|
|
16
16
|
export function nativeModule(): Spec | null {
|