@stream-io/video-client 1.53.0 → 1.53.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.
- package/CHANGELOG.md +7 -0
- package/dist/index.browser.es.js +21 -3
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +21 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +21 -3
- package/dist/index.es.js.map +1 -1
- package/dist/src/devices/MicrophoneManager.d.ts +6 -0
- package/dist/src/types.d.ts +11 -0
- package/package.json +1 -1
- package/src/devices/MicrophoneManager.ts +16 -0
- package/src/devices/__tests__/MicrophoneManagerRN.test.ts +74 -1
- package/src/reporting/ClientEventReporter.ts +5 -0
- package/src/types.ts +12 -0
package/dist/index.es.js
CHANGED
|
@@ -6641,7 +6641,7 @@ const getSdkVersion = (sdk) => {
|
|
|
6641
6641
|
return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
|
|
6642
6642
|
};
|
|
6643
6643
|
|
|
6644
|
-
const version = "1.53.
|
|
6644
|
+
const version = "1.53.1";
|
|
6645
6645
|
const [major, minor, patch] = version.split('.');
|
|
6646
6646
|
let sdkInfo = {
|
|
6647
6647
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -13140,6 +13140,7 @@ class MicrophoneManager extends AudioDeviceManager {
|
|
|
13140
13140
|
]), async ([callingState, ownCapabilities, deviceId, status, permissionState,]) => {
|
|
13141
13141
|
try {
|
|
13142
13142
|
if (callingState === CallingState.LEFT) {
|
|
13143
|
+
this.setMutedRecordingPrepared(false);
|
|
13143
13144
|
await this.stopSpeakingWhileMutedDetection();
|
|
13144
13145
|
}
|
|
13145
13146
|
if (callingState !== CallingState.JOINED)
|
|
@@ -13149,13 +13150,16 @@ class MicrophoneManager extends AudioDeviceManager {
|
|
|
13149
13150
|
if (ownCapabilities.includes(OwnCapability.SEND_AUDIO)) {
|
|
13150
13151
|
const hasPermission = await this.hasPermission(permissionState);
|
|
13151
13152
|
if (hasPermission && status !== 'enabled') {
|
|
13153
|
+
this.setMutedRecordingPrepared(true);
|
|
13152
13154
|
await this.startSpeakingWhileMutedDetection(deviceId);
|
|
13153
13155
|
}
|
|
13154
13156
|
else {
|
|
13157
|
+
this.setMutedRecordingPrepared(false);
|
|
13155
13158
|
await this.stopSpeakingWhileMutedDetection();
|
|
13156
13159
|
}
|
|
13157
13160
|
}
|
|
13158
13161
|
else {
|
|
13162
|
+
this.setMutedRecordingPrepared(false);
|
|
13159
13163
|
await this.stopSpeakingWhileMutedDetection();
|
|
13160
13164
|
}
|
|
13161
13165
|
}
|
|
@@ -13473,6 +13477,16 @@ class MicrophoneManager extends AudioDeviceManager {
|
|
|
13473
13477
|
this.logger.warn('Failed to stop speaking while muted detector', err);
|
|
13474
13478
|
});
|
|
13475
13479
|
}
|
|
13480
|
+
/**
|
|
13481
|
+
* iOS-only: keep the mic-input chain prepared while muted
|
|
13482
|
+
* so the `AVAudioEngine` stays full-duplex and remote audio renders on a
|
|
13483
|
+
* muted join.
|
|
13484
|
+
*/
|
|
13485
|
+
setMutedRecordingPrepared(enabled) {
|
|
13486
|
+
if (!isReactNative())
|
|
13487
|
+
return;
|
|
13488
|
+
globalThis.streamRNVideoSDK?.callManager.setMutedRecordingPrepared?.(enabled);
|
|
13489
|
+
}
|
|
13476
13490
|
async hasPermission(permissionState) {
|
|
13477
13491
|
if (!isReactNative())
|
|
13478
13492
|
return permissionState === 'granted';
|
|
@@ -17449,11 +17463,11 @@ class StreamClient {
|
|
|
17449
17463
|
return await this.wsConnection.connect(this.defaultWSTimeout);
|
|
17450
17464
|
};
|
|
17451
17465
|
this.getSdkVersion = () => this.options.clientAppIdentifier?.sdkVersion ||
|
|
17452
|
-
"1.53.
|
|
17466
|
+
"1.53.1";
|
|
17453
17467
|
this.getUserAgent = () => {
|
|
17454
17468
|
if (!this.cachedUserAgent) {
|
|
17455
17469
|
const { clientAppIdentifier = {} } = this.options;
|
|
17456
|
-
const { sdkName = 'js', sdkVersion = "1.53.
|
|
17470
|
+
const { sdkName = 'js', sdkVersion = "1.53.1", ...extras } = clientAppIdentifier;
|
|
17457
17471
|
this.cachedUserAgent = [
|
|
17458
17472
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
17459
17473
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|
|
@@ -17858,8 +17872,12 @@ class ClientEventReporter {
|
|
|
17858
17872
|
if (!joinAttemptId)
|
|
17859
17873
|
return;
|
|
17860
17874
|
const coordinatorConnectId = this.coordinatorConnectId;
|
|
17875
|
+
const ctx = this.callContexts.get(cid);
|
|
17861
17876
|
this.send({
|
|
17862
17877
|
user_id: this.streamClient.userID,
|
|
17878
|
+
type: ctx?.callType,
|
|
17879
|
+
id: ctx?.callId,
|
|
17880
|
+
call_cid: cid,
|
|
17863
17881
|
stage: 'JoinInitiated',
|
|
17864
17882
|
join_attempt_id: joinAttemptId,
|
|
17865
17883
|
...(coordinatorConnectId && {
|