@voltkit-rtc/react-native 0.1.7 → 0.1.8

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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.8
4
+
5
+ Same peer dependencies as 0.1.7. Build the app again after upgrading: the check below runs in the native module.
6
+
7
+ - **An app that assigns `WebRTCModuleOptions.fieldTrials` in `MainApplication.onCreate` no longer loses the echo tuning
8
+ in silence** (the testers' E09-1). The init provider merges the loudspeaker tuning before `onCreate`, and
9
+ react-native-webrtc reads the field only when its module is made, after it: an assignment there replaced the merged
10
+ string while the provider's log said "tuned for loudspeakers", and nothing showed it. Now the provider logs "will be
11
+ tuned for loudspeakers unless the app replaces WebRTCModuleOptions.fieldTrials in onCreate"; the SDK's module, made
12
+ after `onCreate`, checks that the tuning is still in the field and, when it is not, logs one warning per process
13
+ (`VoltKitRtc: echo suppression: the app replaced WebRTC's field trials after the init provider merged the loudspeaker
14
+ tuning (WebRTCModuleOptions.fieldTrials is now "..."), so WebRTC's canceller runs with its own tuning; append to
15
+ WebRTCModuleOptions.fieldTrials in MainApplication.onCreate instead of assigning it`), reports it as the new native
16
+ constant `echoTuning` (`tuned` | `replaced` | `off`), and `getDiagnostics().userAgent` ends with `echo tuning replaced
17
+ by the app's field trials`. The README and the provider's comment now say that trials set in `onCreate` must be
18
+ appended (the one-line Kotlin and the Java), and that trials set before the provider (`attachBaseContext`) and an
19
+ app's own AEC3 override are kept, as before. The trials themselves are unchanged. Tests: `Aec3TuningTest` (`present`,
20
+ `status`), `echo-tuning.test.ts`.
21
+
3
22
  ## 0.1.7
4
23
 
5
24
  2026-11-09. The echo canceller tuned for loudspeakers. Same peer dependencies as 0.1.6. Build the app again after upgrading:
package/README.md CHANGED
@@ -1481,10 +1481,39 @@ applies the tuning everywhere; `"webrtc"` keeps WebRTC's own tuning everywhere,
1481
1481
  as 0.1.6 had. Set it in the plugin's options
1482
1482
  (`{ "android": { "echoSuppression": "webrtc" } }`), or the meta-data
1483
1483
  `in.voltkit.rtc.ECHO_SUPPRESSION` without Expo, and build again. The tuning is WebRTC's `WebRTC-Aec3SuppressorTuningOverride` field
1484
- trial, handed to react-native-webrtc through `WebRTCModuleOptions.fieldTrials`
1485
- (field trials your app set itself stay); it does nothing while the phone's own
1484
+ trial, which the SDK's startup provider merges into `WebRTCModuleOptions.fieldTrials`
1485
+ before `MainApplication.onCreate` runs; it does nothing while the phone's own
1486
1486
  canceller is in use. The measurement: docs/implementation-progress/ECHO_LAB_2026-11-09.md.
1487
1487
 
1488
+ **Field trials of your own.** They stay beside the tuning when they are set
1489
+ before the provider runs (in `attachBaseContext`) or **appended** in
1490
+ `MainApplication.onCreate`:
1491
+
1492
+ ```kotlin
1493
+ // MainApplication.onCreate, Kotlin
1494
+ WebRTCModuleOptions.getInstance().apply { fieldTrials = (fieldTrials ?: "") + "WebRTC-MyTrial/Enabled/" }
1495
+ ```
1496
+
1497
+ ```java
1498
+ // MainApplication.onCreate, Java
1499
+ WebRTCModuleOptions options = WebRTCModuleOptions.getInstance();
1500
+ options.fieldTrials = (options.fieldTrials == null ? "" : options.fieldTrials) + "WebRTC-MyTrial/Enabled/";
1501
+ ```
1502
+
1503
+ Assigning the field there (`fieldTrials = "WebRTC-MyTrial/Enabled/"`) replaces
1504
+ the tuning: react-native-webrtc reads the field only when its module is made,
1505
+ after `onCreate`, so WebRTC gets your trials and the canceller runs with its
1506
+ own tuning. From 0.1.8 the SDK's native module checks when it starts and logs
1507
+ one warning (`VoltKitRtc: echo suppression: the app replaced WebRTC's field
1508
+ trials after the init provider merged the loudspeaker tuning ...; append to
1509
+ WebRTCModuleOptions.fieldTrials in MainApplication.onCreate instead of assigning
1510
+ it`), its constant `echoTuning` reads `"replaced"` (`"tuned"` while the tuning
1511
+ is in, `"off"` where the SDK did not apply it: the phone's own canceller in use,
1512
+ `"webrtc"`, or `"auto"` on a phone with a vendor's canceller), and
1513
+ `getDiagnostics().userAgent` ends with `echo tuning replaced by the app's field
1514
+ trials`. An AEC3 tuning of your own (a `WebRTC-Aec3SuppressorTuningOverride`
1515
+ trial) is kept and counts as tuned.
1516
+
1488
1517
  An Expo app uses the plugin option, not a hand edit: `expo prebuild` writes the
1489
1518
  manifest again, and the edit is lost. Test either choice on the phone that
1490
1519
  echoed and on another before you ship it. A headset or the earpiece on the
@@ -9,10 +9,15 @@ package com.voltkit.rtc.reactnative
9
9
  * people on the other phones heard themselves, louder than they had spoken. These thresholds are WebRTC's defaults
10
10
  * divided by that factor, and the near-end detector made as much less sensitive. From the lab of 2026-11-09
11
11
  * (docs/implementation-progress/ECHO_LAB_2026-11-09.md). The same string is used by the Flutter and Kotlin SDKs.
12
- * react-native-webrtc hands `WebRTCModuleOptions.fieldTrials` to WebRTC when it starts.
12
+ * react-native-webrtc hands `WebRTCModuleOptions.fieldTrials` to WebRTC when it starts: it reads the field when its
13
+ * WebRTCModule is made, after MainApplication.onCreate, so what counts is the field's value then, not what the init
14
+ * provider merged before onCreate ([present], [status]; E09-1).
13
15
  */
14
16
  internal object Aec3Tuning {
15
- const val LOUDSPEAKER: String = "WebRTC-Aec3SuppressorTuningOverride/" +
17
+ /** The trial's name with its separator: what [merge] looks for, and what must still be in the field when WebRTC starts. */
18
+ const val OVERRIDE: String = "WebRTC-Aec3SuppressorTuningOverride/"
19
+
20
+ const val LOUDSPEAKER: String = OVERRIDE +
16
21
  "normal_tuning_mask_lf_enr_transparent:0.01,normal_tuning_mask_lf_enr_suppress:0.013," +
17
22
  "normal_tuning_mask_hf_enr_transparent:0.0023,normal_tuning_mask_hf_enr_suppress:0.0033," +
18
23
  "nearend_tuning_mask_lf_enr_transparent:0.03,nearend_tuning_mask_lf_enr_suppress:0.04," +
@@ -53,8 +58,28 @@ internal object Aec3Tuning {
53
58
  /** [LOUDSPEAKER] added to field trials the app already set, once; an app's own AEC3 tuning stays. */
54
59
  fun merge(existing: String?): String {
55
60
  val have = existing?.trim().orEmpty()
56
- if (have.contains("WebRTC-Aec3SuppressorTuningOverride/")) return have
61
+ if (present(have)) return have
57
62
  if (have.isEmpty()) return LOUDSPEAKER
58
63
  return (if (have.endsWith("/")) have else "$have/") + LOUDSPEAKER
59
64
  }
65
+
66
+ /** Whether [trials] carry an AEC3 suppressor override: the SDK's [LOUDSPEAKER], or an app's own (which [merge] keeps). */
67
+ fun present(trials: String?): Boolean = trials?.contains(OVERRIDE) == true
68
+
69
+ /** The values of the native constant `echoTuning` ([status]). */
70
+ const val TUNED: String = "tuned"
71
+ const val REPLACED: String = "replaced"
72
+ const val OFF: String = "off"
73
+
74
+ /**
75
+ * The tuning's state once MainApplication.onCreate has run, asked by the SDK's module when it starts (after onCreate,
76
+ * as react-native-webrtc's is): [OFF] when the provider did not merge it ([tunes] said no, or it did not run); [TUNED]
77
+ * while [trials], WebRTCModuleOptions.fieldTrials now, still carry it (set before the provider, or appended to in
78
+ * onCreate); [REPLACED] when the app assigned the field in onCreate instead, which dropped the tuning (E09-1).
79
+ */
80
+ fun status(merged: Boolean, trials: String?): String = when {
81
+ !merged -> OFF
82
+ present(trials) -> TUNED
83
+ else -> REPLACED
84
+ }
60
85
  }
@@ -30,6 +30,15 @@ import java.util.concurrent.CopyOnWriteArraySet
30
30
  * (MainApplication runs after providers): the audio mode and echo cancellation are then the app's, and the constant
31
31
  * audioDeviceModule is false. selectAudioInput keeps working when the app's module is a JavaAudioDeviceModule; with any
32
32
  * other module, or none, it answers false.
33
+ *
34
+ * The same order governs the field trials (0.1.7): this provider merges the loudspeaker tuning into
35
+ * WebRTCModuleOptions.fieldTrials, and react-native-webrtc reads that field only when its WebRTCModule is made, after
36
+ * MainApplication.onCreate. Trials the app sets before the provider runs (attachBaseContext) are merged with. An app that
37
+ * sets trials of its own in onCreate must APPEND to the field, in Kotlin
38
+ * `WebRTCModuleOptions.getInstance().apply { fieldTrials = (fieldTrials ?: "") + "WebRTC-MyTrial/Enabled/" }`;
39
+ * assigning it there replaces the tuning, and the log below cannot know yet. So the log says "will be tuned", and
40
+ * [VoltkitRtcModule], made after onCreate, checks whether the tuning is still there ([Aec3Tuning.status]), warns once
41
+ * when it is not and reports it as the constant `echoTuning` (E09-1).
33
42
  */
34
43
  class VoltkitRtcInitProvider : ContentProvider() {
35
44
  override fun onCreate(): Boolean {
@@ -51,12 +60,16 @@ class VoltkitRtcInitProvider : ContentProvider() {
51
60
  if (config.screenShare) options.enableMediaProjectionService = true
52
61
  // WebRTC's canceller tuned for loudspeakers (0.1.7): a field trial react-native-webrtc hands WebRTC when it
53
62
  // starts, read when the canceller is built. Nothing to tune while the phone's own canceller is in use (WebRTC's
54
- // is then off). Field trials the app set itself stay; this one is added.
63
+ // is then off). Field trials the app set before this provider stay; this one is added. Whether it survives
64
+ // MainApplication.onCreate (an app that assigns the field there drops it) is VoltkitRtcModule's check.
55
65
  if (!config.hardwareEchoCancellation) {
56
66
  val phone = Aec3Tuning.phoneCanceller()
57
67
  val tune = Aec3Tuning.tunes(config.echoSuppression, phone)
58
- if (tune) options.fieldTrials = Aec3Tuning.merge(options.fieldTrials)
59
- Log.i(TAG, "echo suppression ${config.echoSuppression.name}: the phone's canceller is ${phone.describe()}; WebRTC's canceller ${if (tune) "tuned for loudspeakers" else "with its own tuning"}")
68
+ if (tune) {
69
+ options.fieldTrials = Aec3Tuning.merge(options.fieldTrials)
70
+ echoTuningMerged = true
71
+ }
72
+ Log.i(TAG, "echo suppression ${config.echoSuppression.name}: the phone's canceller is ${phone.describe()}; WebRTC's canceller ${if (tune) "will be tuned for loudspeakers unless the app replaces WebRTCModuleOptions.fieldTrials in onCreate" else "with its own tuning"}")
60
73
  }
61
74
  if (options.audioDeviceModule != null) {
62
75
  Log.i(TAG, "react-native-webrtc already has an audio device module; keeping it")
@@ -91,6 +104,15 @@ class VoltkitRtcInitProvider : ContentProvider() {
91
104
  var audioDeviceModule: JavaAudioDeviceModule? = null
92
105
  private set
93
106
 
107
+ /**
108
+ * Whether this provider merged the loudspeaker tuning into WebRTCModuleOptions.fieldTrials. Whether it is still
109
+ * there when WebRTC starts is [VoltkitRtcModule]'s check ([Aec3Tuning.status]): an app that assigns the field in
110
+ * MainApplication.onCreate, instead of appending to it, replaces it (E09-1).
111
+ */
112
+ @Volatile
113
+ var echoTuningMerged: Boolean = false
114
+ private set
115
+
94
116
  /** Microphone failures the audio device module reports, for every client to report (mic-interrupted). */
95
117
  val microphoneErrors = CopyOnWriteArraySet<(String) -> Unit>()
96
118
 
@@ -7,6 +7,7 @@ import android.content.pm.PackageManager
7
7
  import android.os.Build
8
8
  import android.os.Handler
9
9
  import android.os.Looper
10
+ import android.util.Log
10
11
  import androidx.core.content.ContextCompat
11
12
  import com.facebook.react.bridge.Arguments
12
13
  import com.facebook.react.bridge.Promise
@@ -34,6 +35,25 @@ class VoltkitRtcModule(reactContext: ReactApplicationContext) : NativeVoltkitRtc
34
35
  private val config = VoltkitRtcInitProvider.configOf(app)
35
36
  private val main = Handler(Looper.getMainLooper())
36
37
 
38
+ /**
39
+ * Whether the loudspeaker tuning the init provider merged (0.1.7) is still in WebRTCModuleOptions.fieldTrials now
40
+ * that MainApplication.onCreate has run: this module, like react-native-webrtc's, is made after it, and
41
+ * react-native-webrtc reads the field only then. An app that assigned the field in onCreate instead of appending to
42
+ * it shows here as `replaced` (E09-1): one warning per process, and the constant `echoTuning` for the JavaScript.
43
+ */
44
+ private val echoTuning: String = WebRTCModuleOptions.getInstance().fieldTrials.let { trials ->
45
+ Aec3Tuning.status(VoltkitRtcInitProvider.echoTuningMerged, trials).also { status ->
46
+ if (status == Aec3Tuning.REPLACED && echoTuningWarned.compareAndSet(false, true)) {
47
+ Log.w(
48
+ TAG,
49
+ "echo suppression: the app replaced WebRTC's field trials after the init provider merged the loudspeaker tuning " +
50
+ "(WebRTCModuleOptions.fieldTrials is now \"${trials.orEmpty()}\"), so WebRTC's canceller runs with its own tuning; " +
51
+ "append to WebRTCModuleOptions.fieldTrials in MainApplication.onCreate instead of assigning it",
52
+ )
53
+ }
54
+ }
55
+ }
56
+
37
57
  // --- audio ---------------------------------------------------------------------------------------------------
38
58
  private val router: AudioRouter by lazy { AudioRouter.get(app, config.audioMode).also { it.addListener(audioListener) } }
39
59
  private val holders = HashMap<Int, Any>()
@@ -101,6 +121,8 @@ class VoltkitRtcModule(reactContext: ReactApplicationContext) : NativeVoltkitRtc
101
121
  "audioDeviceModule" to VoltkitRtcInitProvider.audioDeviceModule.let {
102
122
  it != null && it === WebRTCModuleOptions.getInstance().audioDeviceModule
103
123
  },
124
+ // tuned | replaced | off: the loudspeaker tuning as this module found it after MainApplication.onCreate (E09-1).
125
+ "echoTuning" to echoTuning,
104
126
  )
105
127
  }
106
128
 
@@ -296,10 +318,14 @@ class VoltkitRtcModule(reactContext: ReactApplicationContext) : NativeVoltkitRtc
296
318
 
297
319
  companion object {
298
320
  const val NAME = NativeVoltkitRtcSpec.NAME
321
+ private const val TAG = "VoltKitRtc"
299
322
 
300
323
  /** Rejections use the VoltKit error registry's codes. */
301
324
  private const val E_MEDIA = "media-unavailable"
302
325
 
326
+ /** The E09-1 warning goes out once per process, not once per React instance (a reload makes a new module). */
327
+ private val echoTuningWarned = AtomicBoolean(false)
328
+
303
329
  private val CALL_SERVICE_PERMISSIONS = listOf(
304
330
  Manifest.permission.FOREGROUND_SERVICE,
305
331
  Manifest.permission.RECORD_AUDIO,
@@ -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.7';
24
+ const SDK_VERSION = exports.SDK_VERSION = '0.1.8';
25
25
 
26
26
  /** The native module, or null where there is none (iOS, Expo Go, an app not rebuilt). */
27
27
  function nativeModule() {
@@ -60,9 +60,15 @@ function localStream(client) {
60
60
  return client.local ?? null;
61
61
  }
62
62
 
63
- /** getDiagnostics().userAgent: `ReactNative android 37; react-native-webrtc 155.0.1; @voltkit-rtc/react-native 0.1.4`. */
63
+ /**
64
+ * getDiagnostics().userAgent: `ReactNative android 37; react-native-webrtc 155.0.1; @voltkit-rtc/react-native 0.1.4`,
65
+ * with `; echo tuning replaced by the app's field trials` at the end when the app assigned WebRTCModuleOptions.fieldTrials
66
+ * in MainApplication.onCreate after the init provider had merged the loudspeaker tuning (the native constant
67
+ * `echoTuning`, E09-1): the one diagnostic an app or a tester reads that shows it.
68
+ */
64
69
  function describePlatform() {
65
- return `ReactNative ${_reactNative.Platform.OS} ${String(_reactNative.Platform.Version)}; react-native-webrtc ${(0, _globals.webrtcVersion)() ?? 'unknown'}; @voltkit-rtc/react-native ${_native.SDK_VERSION}`;
70
+ const platform = `ReactNative ${_reactNative.Platform.OS} ${String(_reactNative.Platform.Version)}; react-native-webrtc ${(0, _globals.webrtcVersion)() ?? 'unknown'}; @voltkit-rtc/react-native ${_native.SDK_VERSION}`;
71
+ return (0, _native.nativeConstants)()?.echoTuning === 'replaced' ? `${platform}; echo tuning replaced by the app's field trials` : platform;
66
72
  }
67
73
 
68
74
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_client","_globals","_native","_errors","_permissions","_streams","localStream","client","local","describePlatform","Platform","OS","String","Version","webrtcVersion","SDK_VERSION","deviceEnv","device","isPad","userAgent","uaMobile","maxTouchPoints","hardwareH264","supported","smooth","powerEfficient","exports","kindsOf","constraints","kinds","video","push","audio","captureUserMedia","webrtc","loadWebRTC","webrtcMissing","statuses","checkMediaPermissions","kind","status","permissionRefused","stream","mediaDevices","getUserMedia","err","name","RpcError","join","describeError","reason","book","streamBook","adopt","missing","getVideoTracks","length","getAudioTracks","tracks","getTracks","release","track","stop"],"sourceRoot":"../../../src","sources":["platform/common.ts"],"mappings":";;;;;;;;;;;AAIA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAA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AC;EAC7K;EACA,MAAMK,IAAI,GAAG,IAAAC,mBAAU,EAAC,CAAC;EACzBD,IAAI,CAACE,KAAK,CAACX,MAAM,EAAE,SAAS,CAAC;EAC7B,MAAMY,OAAmC,GAAG1B,WAAW,CAACE,KAAK,IAAIY,MAAM,CAACa,cAAc,CAAC,CAAC,CAACC,MAAM,KAAK,CAAC,GACjG,QAAQ,GACR5B,WAAW,CAACI,KAAK,IAAIU,MAAM,CAACe,cAAc,CAAC,CAAC,CAACD,MAAM,KAAK,CAAC,GAAG,YAAY,GAAG,IAAI;EACnF,IAAIF,OAAO,EAAE;IACX,MAAMI,MAAM,GAAGhB,MAAM,CAACiB,SAAS,CAAC,CAAC;IACjCR,IAAI,CAACS,OAAO,CAAClB,MAAM,CAAC;IACpB,KAAK,MAAMmB,KAAK,IAAIH,MAAM,EAAEP,IAAI,CAACW,IAAI,CAACD,KAAK,CAAC;IAC5C,MAAM,IAAApB,yBAAiB,EAACa,OAAO,EAAE,QAAQ,CAAC;EAC5C;EACA,OAAOZ,MAAM;AACf","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_client","_globals","_native","_errors","_permissions","_streams","localStream","client","local","describePlatform","platform","Platform","OS","String","Version","webrtcVersion","SDK_VERSION","nativeConstants","echoTuning","deviceEnv","device","isPad","userAgent","uaMobile","maxTouchPoints","hardwareH264","supported","smooth","powerEfficient","exports","kindsOf","constraints","kinds","video","push","audio","captureUserMedia","webrtc","loadWebRTC","webrtcMissing","statuses","checkMediaPermissions","kind","status","permissionRefused","stream","mediaDevices","getUserMedia","err","name","RpcError","join","describeError","reason","book","streamBook","adopt","missing","getVideoTracks","length","getAudioTracks","tracks","getTracks","release","track","stop"],"sourceRoot":"../../../src","sources":["platform/common.ts"],"mappings":";;;;;;;;;;;AAIA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA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AC,OAAO,CAAC,KAAK,IAAAC,qBAAa,EAACJ,GAAG,CAAC,EAAE,EAAE;MAAEK,MAAM,EAAE,OAAOJ,IAAI,KAAK,QAAQ,GAAGA,IAAI,GAAG;IAAiB,CAAC,CAAC;EAC7K;EACA,MAAMK,IAAI,GAAG,IAAAC,mBAAU,EAAC,CAAC;EACzBD,IAAI,CAACE,KAAK,CAACX,MAAM,EAAE,SAAS,CAAC;EAC7B,MAAMY,OAAmC,GAAG1B,WAAW,CAACE,KAAK,IAAIY,MAAM,CAACa,cAAc,CAAC,CAAC,CAACC,MAAM,KAAK,CAAC,GACjG,QAAQ,GACR5B,WAAW,CAACI,KAAK,IAAIU,MAAM,CAACe,cAAc,CAAC,CAAC,CAACD,MAAM,KAAK,CAAC,GAAG,YAAY,GAAG,IAAI;EACnF,IAAIF,OAAO,EAAE;IACX,MAAMI,MAAM,GAAGhB,MAAM,CAACiB,SAAS,CAAC,CAAC;IACjCR,IAAI,CAACS,OAAO,CAAClB,MAAM,CAAC;IACpB,KAAK,MAAMmB,KAAK,IAAIH,MAAM,EAAEP,IAAI,CAACW,IAAI,CAACD,KAAK,CAAC;IAC5C,MAAM,IAAApB,yBAAiB,EAACa,OAAO,EAAE,QAAQ,CAAC;EAC5C;EACA,OAAOZ,MAAM;AACf","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","get"],"sourceRoot":"../../../src","sources":["specs/NativeVoltkitRtc.ts"],"mappings":";;;;;;AAWA,IAAAA,YAAA,GAAAC,OAAA;AAXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AAcA;AAOA;AAKA;AAKA;AAKA;AAKA;AAKA;AAeA;AAQA;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAiGeC,gCAAmB,CAACC,GAAG,CAAO,YAAY,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","get"],"sourceRoot":"../../../src","sources":["specs/NativeVoltkitRtc.ts"],"mappings":";;;;;;AAWA,IAAAA,YAAA,GAAAC,OAAA;AAXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AAcA;AAOA;AAKA;AAKA;AAKA;AAKA;AAKA;AAeA;AAQA;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAyGeC,gCAAmB,CAACC,GAAG,CAAO,YAAY,CAAC","ignoreList":[]}
@@ -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.7';
12
+ export const SDK_VERSION = '0.1.8';
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() {
@@ -7,7 +7,7 @@
7
7
  import { Platform } from 'react-native';
8
8
  import { RpcError } from '@voltkit-rtc/client';
9
9
  import { loadWebRTC, webrtcVersion } from "../globals.js";
10
- import { SDK_VERSION } from "../native.js";
10
+ import { nativeConstants, SDK_VERSION } from "../native.js";
11
11
  import { describeError, permissionRefused, webrtcMissing } from "../errors.js";
12
12
  import { checkMediaPermissions } from "../permissions.js";
13
13
  import { streamBook } from "./streams.js";
@@ -51,9 +51,15 @@ export function localStream(client) {
51
51
  return client.local ?? null;
52
52
  }
53
53
 
54
- /** getDiagnostics().userAgent: `ReactNative android 37; react-native-webrtc 155.0.1; @voltkit-rtc/react-native 0.1.4`. */
54
+ /**
55
+ * getDiagnostics().userAgent: `ReactNative android 37; react-native-webrtc 155.0.1; @voltkit-rtc/react-native 0.1.4`,
56
+ * with `; echo tuning replaced by the app's field trials` at the end when the app assigned WebRTCModuleOptions.fieldTrials
57
+ * in MainApplication.onCreate after the init provider had merged the loudspeaker tuning (the native constant
58
+ * `echoTuning`, E09-1): the one diagnostic an app or a tester reads that shows it.
59
+ */
55
60
  export function describePlatform() {
56
- return `ReactNative ${Platform.OS} ${String(Platform.Version)}; react-native-webrtc ${webrtcVersion() ?? 'unknown'}; @voltkit-rtc/react-native ${SDK_VERSION}`;
61
+ const platform = `ReactNative ${Platform.OS} ${String(Platform.Version)}; react-native-webrtc ${webrtcVersion() ?? 'unknown'}; @voltkit-rtc/react-native ${SDK_VERSION}`;
62
+ return nativeConstants()?.echoTuning === 'replaced' ? `${platform}; echo tuning replaced by the app's field trials` : platform;
57
63
  }
58
64
 
59
65
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","RpcError","loadWebRTC","webrtcVersion","SDK_VERSION","describeError","permissionRefused","webrtcMissing","checkMediaPermissions","streamBook","localStream","client","local","describePlatform","OS","String","Version","deviceEnv","device","isPad","userAgent","uaMobile","maxTouchPoints","hardwareH264","supported","smooth","powerEfficient","kindsOf","constraints","kinds","video","push","audio","captureUserMedia","webrtc","statuses","kind","status","stream","mediaDevices","getUserMedia","err","name","join","reason","book","adopt","missing","getVideoTracks","length","getAudioTracks","tracks","getTracks","release","track","stop"],"sourceRoot":"../../../src","sources":["platform/common.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,QAAQ,QAAqE,qBAAqB;AAC3G,SAASC,UAAU,EAAEC,aAAa,QAAQ,eAAY;AACtD,SAASC,WAAW,QAAQ,cAAW;AACvC,SAASC,aAAa,EAAEC,iBAAiB,EAAEC,aAAa,QAAkC,cAAW;AACrG,SAASC,qBAAqB,QAAQ,mBAAgB;AACtD,SAASC,UAAU,QAAyB,cAAW;;AAEvD;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;;AAaA;AACA,OAAO,SAASC,WAAWA,CAACC,MA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AAI;EACnF,IAAIF,OAAO,EAAE;IACX,MAAMI,MAAM,GAAGb,MAAM,CAACc,SAAS,CAAC,CAAC;IACjCP,IAAI,CAACQ,OAAO,CAACf,MAAM,CAAC;IACpB,KAAK,MAAMgB,KAAK,IAAIH,MAAM,EAAEN,IAAI,CAACU,IAAI,CAACD,KAAK,CAAC;IAC5C,MAAMhD,iBAAiB,CAACyC,OAAO,EAAE,QAAQ,CAAC;EAC5C;EACA,OAAOT,MAAM;AACf","ignoreList":[]}
1
+ {"version":3,"names":["Platform","RpcError","loadWebRTC","webrtcVersion","nativeConstants","SDK_VERSION","describeError","permissionRefused","webrtcMissing","checkMediaPermissions","streamBook","localStream","client","local","describePlatform","platform","OS","String","Version","echoTuning","deviceEnv","device","isPad","userAgent","uaMobile","maxTouchPoints","hardwareH264","supported","smooth","powerEfficient","kindsOf","constraints","kinds","video","push","audio","captureUserMedia","webrtc","statuses","kind","status","stream","mediaDevices","getUserMedia","err","name","join","reason","book","adopt","missing","getVideoTracks","length","getAudioTracks","tracks","getTracks","release","track","stop"],"sourceRoot":"../../../src","sources":["platform/common.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,QAAQ,QAAqE,qBAAqB;AAC3G,SAASC,UAAU,EAAEC,aAAa,QAAQ,eAAY;AACtD,SAASC,eAAe,EAAEC,WAAW,QAAQ,cAAW;AACxD,SAASC,aAAa,EAAEC,iBAAiB,EAAEC,aAAa,QAAkC,cAAW;AACrG,SAASC,qBAAqB,QAAQ,mBAAgB;AACtD,SAASC,UAAU,QAAyB,cAAW;;AAEvD;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;;AAaA;AACA,OAAO,SAASC,WAAWA,CAACC,MAAmC,EAA0B;EACvF,OAAQA,MAAM,CAACC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,GACRrB,WAAW,CAACI,KAAK,IAAIM,MAAM,CAACY,cAAc,CAAC,CAAC,CAACD,MAAM,KAAK,CAAC,GAAG,YAAY,GAAG,IAAI;EACnF,IAAIF,OAAO,EAAE;IACX,MAAMI,MAAM,GAAGb,MAAM,CAACc,SAAS,CAAC,CAAC;IACjCP,IAAI,CAACQ,OAAO,CAACf,MAAM,CAAC;IACpB,KAAK,MAAMgB,KAAK,IAAIH,MAAM,EAAEN,IAAI,CAACU,IAAI,CAACD,KAAK,CAAC;IAC5C,MAAMlD,iBAAiB,CAAC2C,OAAO,EAAE,QAAQ,CAAC;EAC5C;EACA,OAAOT,MAAM;AACf","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["TurboModuleRegistry","get"],"sourceRoot":"../../../src","sources":["specs/NativeVoltkitRtc.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;;AAElD;;AAcA;;AAOA;;AAKA;;AAKA;;AAKA;;AAKA;;AAKA;;AAeA;;AAQA;;AAiGA,eAAeA,mBAAmB,CAACC,GAAG,CAAO,YAAY,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["TurboModuleRegistry","get"],"sourceRoot":"../../../src","sources":["specs/NativeVoltkitRtc.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;;AAElD;;AAcA;;AAOA;;AAKA;;AAKA;;AAKA;;AAKA;;AAKA;;AAeA;;AAQA;;AAyGA,eAAeA,mBAAmB,CAACC,GAAG,CAAO,YAAY,CAAC","ignoreList":[]}
@@ -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.7";
5
+ export declare const SDK_VERSION = "0.1.8";
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. */
@@ -72,7 +72,12 @@ export interface MediaStreamLike {
72
72
  export declare function localStream(client: {
73
73
  readonly local: unknown;
74
74
  }): MediaStreamLike | null;
75
- /** getDiagnostics().userAgent: `ReactNative android 37; react-native-webrtc 155.0.1; @voltkit-rtc/react-native 0.1.4`. */
75
+ /**
76
+ * getDiagnostics().userAgent: `ReactNative android 37; react-native-webrtc 155.0.1; @voltkit-rtc/react-native 0.1.4`,
77
+ * with `; echo tuning replaced by the app's field trials` at the end when the app assigned WebRTCModuleOptions.fieldTrials
78
+ * in MainApplication.onCreate after the init provider had merged the loudspeaker tuning (the native constant
79
+ * `echoTuning`, E09-1): the one diagnostic an app or a tester reads that shows it.
80
+ */
76
81
  export declare function describePlatform(): string;
77
82
  /**
78
83
  * What the client reads to pick its defaults: a phone or tablet, so two simulcast layers and the H.264 decision
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/platform/common.ts"],"names":[],"mappings":"AAKA,OAAO,EAAY,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG5G,OAAO,EAAmD,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAItG;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9F,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC;AACtE,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAA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,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CACxC;AAED,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,MAAM,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG,eAAe,GAAG,IAAI,CAEvF;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAGzC;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,SAAS,CAGrC;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,iBAAyG,CAAC;AAErI,oDAAoD;AACpD,wBAAgB,OAAO,CAAC,WAAW,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,mBAAmB,EAAE,CAKhG;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,CA6B/F"}
@@ -97,6 +97,14 @@ export type Constants = {
97
97
  * when that one is a JavaAudioDeviceModule) or the provider did not run.
98
98
  */
99
99
  audioDeviceModule: boolean;
100
+ /**
101
+ * The echo canceller's loudspeaker tuning (0.1.7) as the native module found it when it started, after
102
+ * MainApplication.onCreate: `tuned` while WebRTCModuleOptions.fieldTrials still carries it; `replaced` when the app
103
+ * assigned that field in onCreate instead of appending to it, so WebRTC got the app's trials without the tuning (the
104
+ * module logs one warning, and getDiagnostics().userAgent says so); `off` when the init provider did not merge it
105
+ * (hardwareEchoCancellation, echoSuppression `webrtc`, `auto` on a phone with a vendor's canceller) or did not run.
106
+ */
107
+ echoTuning: string;
100
108
  };
101
109
  export interface Spec extends TurboModule {
102
110
  getConstants(): Constants;
@@ -1 +1 @@
1
- {"version":3,"file":"NativeVoltkitRtc.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativeVoltkitRtc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,YAAY,EA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CAAC,qBAAqB,EAAE,YAAY,CAAC,YAAY,CAAC,wBAAwB,CAAC,CAAC;IACpF,QAAQ,CAAC,oBAAoB,EAAE,YAAY,CAAC,YAAY,CAAC,uBAAuB,CAAC,CAAC;IAClF,QAAQ,CAAC,mBAAmB,EAAE,YAAY,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC;IAChF,QAAQ,CAAC,iBAAiB,EAAE,YAAY,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC;IAC5E,QAAQ,CAAC,sBAAsB,EAAE,YAAY,CAAC,YAAY,CAAC,yBAAyB,CAAC,CAAC;IACtF,QAAQ,CAAC,kBAAkB,EAAE,YAAY,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC;IAC9E,QAAQ,CAAC,kBAAkB,EAAE,YAAY,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;IACzE,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;CACrD;;AAED,wBAA2D"}
@@ -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.7";
5
+ export declare const SDK_VERSION = "0.1.8";
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. */
@@ -72,7 +72,12 @@ export interface MediaStreamLike {
72
72
  export declare function localStream(client: {
73
73
  readonly local: unknown;
74
74
  }): MediaStreamLike | null;
75
- /** getDiagnostics().userAgent: `ReactNative android 37; react-native-webrtc 155.0.1; @voltkit-rtc/react-native 0.1.4`. */
75
+ /**
76
+ * getDiagnostics().userAgent: `ReactNative android 37; react-native-webrtc 155.0.1; @voltkit-rtc/react-native 0.1.4`,
77
+ * with `; echo tuning replaced by the app's field trials` at the end when the app assigned WebRTCModuleOptions.fieldTrials
78
+ * in MainApplication.onCreate after the init provider had merged the loudspeaker tuning (the native constant
79
+ * `echoTuning`, E09-1): the one diagnostic an app or a tester reads that shows it.
80
+ */
76
81
  export declare function describePlatform(): string;
77
82
  /**
78
83
  * What the client reads to pick its defaults: a phone or tablet, so two simulcast layers and the H.264 decision
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/platform/common.ts"],"names":[],"mappings":"AAKA,OAAO,EAAY,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG5G,OAAO,EAAmD,KAAK,mBAAmB,EAAE,MAAM,cAAW,CAAC;AAItG;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,WAAW,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9F,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC;AACtE,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAGrE;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;CAC5C;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC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,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,mBAAmB,EAAE,CAKhG;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,CA6B/F"}
@@ -97,6 +97,14 @@ export type Constants = {
97
97
  * when that one is a JavaAudioDeviceModule) or the provider did not run.
98
98
  */
99
99
  audioDeviceModule: boolean;
100
+ /**
101
+ * The echo canceller's loudspeaker tuning (0.1.7) as the native module found it when it started, after
102
+ * MainApplication.onCreate: `tuned` while WebRTCModuleOptions.fieldTrials still carries it; `replaced` when the app
103
+ * assigned that field in onCreate instead of appending to it, so WebRTC got the app's trials without the tuning (the
104
+ * module logs one warning, and getDiagnostics().userAgent says so); `off` when the init provider did not merge it
105
+ * (hardwareEchoCancellation, echoSuppression `webrtc`, `auto` on a phone with a vendor's canceller) or did not run.
106
+ */
107
+ echoTuning: string;
100
108
  };
101
109
  export interface Spec extends TurboModule {
102
110
  getConstants(): Constants;
@@ -1 +1 @@
1
- {"version":3,"file":"NativeVoltkitRtc.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativeVoltkitRtc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG9D,6EAA6E;AAC7E,MAAM,MAAM,WAAW,GAAG;IACxB,+GAA+G;IAC/G,QAAQ,EAAE,MAAM,CAAC;IACjB,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,8FAA8F;IAC9F,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,sGAAsG;AACtG,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,KAAK,EAAE,W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,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC;IAC9E,QAAQ,CAAC,kBAAkB,EAAE,YAAY,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;IACzE,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;CACrD;;AAED,wBAA2D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltkit-rtc/react-native",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
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",
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.7';
13
+ export const SDK_VERSION = '0.1.8';
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 {
@@ -5,7 +5,7 @@
5
5
  import { Platform } from 'react-native';
6
6
  import { RpcError, type ClientPlatform, type DeviceEnv, type EncodingInfoProbe } from '@voltkit-rtc/client';
7
7
  import { loadWebRTC, webrtcVersion } from '../globals';
8
- import { SDK_VERSION } from '../native';
8
+ import { nativeConstants, SDK_VERSION } from '../native';
9
9
  import { describeError, permissionRefused, webrtcMissing, type MediaPermissionKind } from '../errors';
10
10
  import { checkMediaPermissions } from '../permissions';
11
11
  import { streamBook, type StreamLike } from './streams';
@@ -89,9 +89,15 @@ export function localStream(client: { readonly local: unknown }): MediaStreamLik
89
89
  return (client.local as MediaStreamLike | null | undefined) ?? null;
90
90
  }
91
91
 
92
- /** getDiagnostics().userAgent: `ReactNative android 37; react-native-webrtc 155.0.1; @voltkit-rtc/react-native 0.1.4`. */
92
+ /**
93
+ * getDiagnostics().userAgent: `ReactNative android 37; react-native-webrtc 155.0.1; @voltkit-rtc/react-native 0.1.4`,
94
+ * with `; echo tuning replaced by the app's field trials` at the end when the app assigned WebRTCModuleOptions.fieldTrials
95
+ * in MainApplication.onCreate after the init provider had merged the loudspeaker tuning (the native constant
96
+ * `echoTuning`, E09-1): the one diagnostic an app or a tester reads that shows it.
97
+ */
93
98
  export function describePlatform(): string {
94
- return `ReactNative ${Platform.OS} ${String(Platform.Version)}; react-native-webrtc ${webrtcVersion() ?? 'unknown'}; @voltkit-rtc/react-native ${SDK_VERSION}`;
99
+ const platform = `ReactNative ${Platform.OS} ${String(Platform.Version)}; react-native-webrtc ${webrtcVersion() ?? 'unknown'}; @voltkit-rtc/react-native ${SDK_VERSION}`;
100
+ return nativeConstants()?.echoTuning === 'replaced' ? `${platform}; echo tuning replaced by the app's field trials` : platform;
95
101
  }
96
102
 
97
103
  /**
@@ -109,6 +109,14 @@ export type Constants = {
109
109
  * when that one is a JavaAudioDeviceModule) or the provider did not run.
110
110
  */
111
111
  audioDeviceModule: boolean;
112
+ /**
113
+ * The echo canceller's loudspeaker tuning (0.1.7) as the native module found it when it started, after
114
+ * MainApplication.onCreate: `tuned` while WebRTCModuleOptions.fieldTrials still carries it; `replaced` when the app
115
+ * assigned that field in onCreate instead of appending to it, so WebRTC got the app's trials without the tuning (the
116
+ * module logs one warning, and getDiagnostics().userAgent says so); `off` when the init provider did not merge it
117
+ * (hardwareEchoCancellation, echoSuppression `webrtc`, `auto` on a phone with a vendor's canceller) or did not run.
118
+ */
119
+ echoTuning: string;
112
120
  };
113
121
 
114
122
  export interface Spec extends TurboModule {