@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.es.js
CHANGED
|
@@ -6282,7 +6282,7 @@ const getSdkVersion = (sdk) => {
|
|
|
6282
6282
|
return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
|
|
6283
6283
|
};
|
|
6284
6284
|
|
|
6285
|
-
const version = "1.44.
|
|
6285
|
+
const version = "1.44.2";
|
|
6286
6286
|
const [major, minor, patch] = version.split('.');
|
|
6287
6287
|
let sdkInfo = {
|
|
6288
6288
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -12998,7 +12998,8 @@ class Call {
|
|
|
12998
12998
|
// const calls = useCalls().filter((c) => c.ringing);
|
|
12999
12999
|
const calls = this.clientStore.calls.filter((c) => c.cid !== this.cid);
|
|
13000
13000
|
this.clientStore.setCalls([this, ...calls]);
|
|
13001
|
-
|
|
13001
|
+
const skipSpeakerApply = isReactNative();
|
|
13002
|
+
await this.applyDeviceConfig(settings, false, skipSpeakerApply);
|
|
13002
13003
|
};
|
|
13003
13004
|
/**
|
|
13004
13005
|
* Loads the information about the call.
|
|
@@ -13021,7 +13022,13 @@ class Call {
|
|
|
13021
13022
|
this.watching = true;
|
|
13022
13023
|
this.clientStore.registerOrUpdateCall(this);
|
|
13023
13024
|
}
|
|
13024
|
-
|
|
13025
|
+
// Skip speaker setup on RN if ringing was requested or the call is already ringing
|
|
13026
|
+
const skipSpeakerApply = isReactNative()
|
|
13027
|
+
? params?.ring === true
|
|
13028
|
+
? true
|
|
13029
|
+
: this.ringing
|
|
13030
|
+
: false;
|
|
13031
|
+
await this.applyDeviceConfig(response.call.settings, false, skipSpeakerApply);
|
|
13025
13032
|
return response;
|
|
13026
13033
|
};
|
|
13027
13034
|
/**
|
|
@@ -13042,7 +13049,13 @@ class Call {
|
|
|
13042
13049
|
this.watching = true;
|
|
13043
13050
|
this.clientStore.registerOrUpdateCall(this);
|
|
13044
13051
|
}
|
|
13045
|
-
|
|
13052
|
+
// Skip speaker setup on RN if ringing was requested or the call is already ringing
|
|
13053
|
+
const skipSpeakerApply = isReactNative()
|
|
13054
|
+
? data?.ring === true
|
|
13055
|
+
? true
|
|
13056
|
+
: this.ringing
|
|
13057
|
+
: false;
|
|
13058
|
+
await this.applyDeviceConfig(response.call.settings, false, skipSpeakerApply);
|
|
13046
13059
|
return response;
|
|
13047
13060
|
};
|
|
13048
13061
|
/**
|
|
@@ -13297,7 +13310,7 @@ class Call {
|
|
|
13297
13310
|
// device settings should be applied only once, we don't have to
|
|
13298
13311
|
// re-apply them on later reconnections or server-side data fetches
|
|
13299
13312
|
if (!this.deviceSettingsAppliedOnce && this.state.settings) {
|
|
13300
|
-
await this.applyDeviceConfig(this.state.settings, true);
|
|
13313
|
+
await this.applyDeviceConfig(this.state.settings, true, false);
|
|
13301
13314
|
globalThis.streamRNVideoSDK?.callManager.start();
|
|
13302
13315
|
this.deviceSettingsAppliedOnce = true;
|
|
13303
13316
|
}
|
|
@@ -14555,8 +14568,10 @@ class Call {
|
|
|
14555
14568
|
*
|
|
14556
14569
|
* @internal
|
|
14557
14570
|
*/
|
|
14558
|
-
this.applyDeviceConfig = async (settings, publish) => {
|
|
14559
|
-
|
|
14571
|
+
this.applyDeviceConfig = async (settings, publish, skipSpeakerApply) => {
|
|
14572
|
+
if (!skipSpeakerApply) {
|
|
14573
|
+
this.speaker.apply(settings);
|
|
14574
|
+
}
|
|
14560
14575
|
await this.camera.apply(settings.video, publish).catch((err) => {
|
|
14561
14576
|
this.logger.warn('Camera init failed', err);
|
|
14562
14577
|
});
|
|
@@ -15869,7 +15884,7 @@ class StreamClient {
|
|
|
15869
15884
|
this.getUserAgent = () => {
|
|
15870
15885
|
if (!this.cachedUserAgent) {
|
|
15871
15886
|
const { clientAppIdentifier = {} } = this.options;
|
|
15872
|
-
const { sdkName = 'js', sdkVersion = "1.44.
|
|
15887
|
+
const { sdkName = 'js', sdkVersion = "1.44.2", ...extras } = clientAppIdentifier;
|
|
15873
15888
|
this.cachedUserAgent = [
|
|
15874
15889
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
15875
15890
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|
|
@@ -16304,7 +16319,7 @@ class StreamVideoClient {
|
|
|
16304
16319
|
clientStore: this.writeableStateStore,
|
|
16305
16320
|
});
|
|
16306
16321
|
call.state.updateFromCallResponse(c.call);
|
|
16307
|
-
await call.applyDeviceConfig(c.call.settings, false);
|
|
16322
|
+
await call.applyDeviceConfig(c.call.settings, false, isReactNative());
|
|
16308
16323
|
if (data.watch) {
|
|
16309
16324
|
await call.setup();
|
|
16310
16325
|
this.writeableStateStore.registerCall(call);
|