@stream-io/video-client 1.44.1 → 1.44.2
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 +6 -0
- package/dist/index.browser.es.js +24 -9
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +24 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +24 -9
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +1 -1
- package/package.json +1 -1
- package/src/Call.ts +30 -6
- package/src/StreamVideoClient.ts +2 -1
package/dist/index.cjs.js
CHANGED
|
@@ -6301,7 +6301,7 @@ const getSdkVersion = (sdk) => {
|
|
|
6301
6301
|
return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
|
|
6302
6302
|
};
|
|
6303
6303
|
|
|
6304
|
-
const version = "1.44.
|
|
6304
|
+
const version = "1.44.2";
|
|
6305
6305
|
const [major, minor, patch] = version.split('.');
|
|
6306
6306
|
let sdkInfo = {
|
|
6307
6307
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -13017,7 +13017,8 @@ class Call {
|
|
|
13017
13017
|
// const calls = useCalls().filter((c) => c.ringing);
|
|
13018
13018
|
const calls = this.clientStore.calls.filter((c) => c.cid !== this.cid);
|
|
13019
13019
|
this.clientStore.setCalls([this, ...calls]);
|
|
13020
|
-
|
|
13020
|
+
const skipSpeakerApply = isReactNative();
|
|
13021
|
+
await this.applyDeviceConfig(settings, false, skipSpeakerApply);
|
|
13021
13022
|
};
|
|
13022
13023
|
/**
|
|
13023
13024
|
* Loads the information about the call.
|
|
@@ -13040,7 +13041,13 @@ class Call {
|
|
|
13040
13041
|
this.watching = true;
|
|
13041
13042
|
this.clientStore.registerOrUpdateCall(this);
|
|
13042
13043
|
}
|
|
13043
|
-
|
|
13044
|
+
// Skip speaker setup on RN if ringing was requested or the call is already ringing
|
|
13045
|
+
const skipSpeakerApply = isReactNative()
|
|
13046
|
+
? params?.ring === true
|
|
13047
|
+
? true
|
|
13048
|
+
: this.ringing
|
|
13049
|
+
: false;
|
|
13050
|
+
await this.applyDeviceConfig(response.call.settings, false, skipSpeakerApply);
|
|
13044
13051
|
return response;
|
|
13045
13052
|
};
|
|
13046
13053
|
/**
|
|
@@ -13061,7 +13068,13 @@ class Call {
|
|
|
13061
13068
|
this.watching = true;
|
|
13062
13069
|
this.clientStore.registerOrUpdateCall(this);
|
|
13063
13070
|
}
|
|
13064
|
-
|
|
13071
|
+
// Skip speaker setup on RN if ringing was requested or the call is already ringing
|
|
13072
|
+
const skipSpeakerApply = isReactNative()
|
|
13073
|
+
? data?.ring === true
|
|
13074
|
+
? true
|
|
13075
|
+
: this.ringing
|
|
13076
|
+
: false;
|
|
13077
|
+
await this.applyDeviceConfig(response.call.settings, false, skipSpeakerApply);
|
|
13065
13078
|
return response;
|
|
13066
13079
|
};
|
|
13067
13080
|
/**
|
|
@@ -13316,7 +13329,7 @@ class Call {
|
|
|
13316
13329
|
// device settings should be applied only once, we don't have to
|
|
13317
13330
|
// re-apply them on later reconnections or server-side data fetches
|
|
13318
13331
|
if (!this.deviceSettingsAppliedOnce && this.state.settings) {
|
|
13319
|
-
await this.applyDeviceConfig(this.state.settings, true);
|
|
13332
|
+
await this.applyDeviceConfig(this.state.settings, true, false);
|
|
13320
13333
|
globalThis.streamRNVideoSDK?.callManager.start();
|
|
13321
13334
|
this.deviceSettingsAppliedOnce = true;
|
|
13322
13335
|
}
|
|
@@ -14574,8 +14587,10 @@ class Call {
|
|
|
14574
14587
|
*
|
|
14575
14588
|
* @internal
|
|
14576
14589
|
*/
|
|
14577
|
-
this.applyDeviceConfig = async (settings, publish) => {
|
|
14578
|
-
|
|
14590
|
+
this.applyDeviceConfig = async (settings, publish, skipSpeakerApply) => {
|
|
14591
|
+
if (!skipSpeakerApply) {
|
|
14592
|
+
this.speaker.apply(settings);
|
|
14593
|
+
}
|
|
14579
14594
|
await this.camera.apply(settings.video, publish).catch((err) => {
|
|
14580
14595
|
this.logger.warn('Camera init failed', err);
|
|
14581
14596
|
});
|
|
@@ -15888,7 +15903,7 @@ class StreamClient {
|
|
|
15888
15903
|
this.getUserAgent = () => {
|
|
15889
15904
|
if (!this.cachedUserAgent) {
|
|
15890
15905
|
const { clientAppIdentifier = {} } = this.options;
|
|
15891
|
-
const { sdkName = 'js', sdkVersion = "1.44.
|
|
15906
|
+
const { sdkName = 'js', sdkVersion = "1.44.2", ...extras } = clientAppIdentifier;
|
|
15892
15907
|
this.cachedUserAgent = [
|
|
15893
15908
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
15894
15909
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|
|
@@ -16323,7 +16338,7 @@ class StreamVideoClient {
|
|
|
16323
16338
|
clientStore: this.writeableStateStore,
|
|
16324
16339
|
});
|
|
16325
16340
|
call.state.updateFromCallResponse(c.call);
|
|
16326
|
-
await call.applyDeviceConfig(c.call.settings, false);
|
|
16341
|
+
await call.applyDeviceConfig(c.call.settings, false, isReactNative());
|
|
16327
16342
|
if (data.watch) {
|
|
16328
16343
|
await call.setup();
|
|
16329
16344
|
this.writeableStateStore.registerCall(call);
|