@stream-io/video-client 1.37.0 → 1.37.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 +6 -0
- package/dist/index.browser.es.js +22 -5
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +22 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +22 -5
- package/dist/index.es.js.map +1 -1
- package/dist/src/store/CallState.d.ts +9 -0
- package/package.json +1 -1
- package/src/helpers/DynascaleManager.ts +9 -3
- package/src/store/CallState.ts +12 -0
package/dist/index.cjs.js
CHANGED
|
@@ -5010,6 +5010,17 @@ class CallState {
|
|
|
5010
5010
|
this.setAnonymousParticipantCount = (count) => {
|
|
5011
5011
|
return this.setCurrentValue(this.anonymousParticipantCountSubject, count);
|
|
5012
5012
|
};
|
|
5013
|
+
/**
|
|
5014
|
+
* Returns the current participants array directly from the BehaviorSubject.
|
|
5015
|
+
* This bypasses the observable pipeline and is guaranteed to be synchronous.
|
|
5016
|
+
* Use this when you need the absolute latest value without any potential
|
|
5017
|
+
* timing issues from shareReplay/refCount.
|
|
5018
|
+
*
|
|
5019
|
+
* @internal
|
|
5020
|
+
*/
|
|
5021
|
+
this.getParticipantsSnapshot = () => {
|
|
5022
|
+
return this.participantsSubject.getValue();
|
|
5023
|
+
};
|
|
5013
5024
|
/**
|
|
5014
5025
|
* Sets the list of participants in the current call.
|
|
5015
5026
|
*
|
|
@@ -5989,7 +6000,7 @@ const getSdkVersion = (sdk) => {
|
|
|
5989
6000
|
return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
|
|
5990
6001
|
};
|
|
5991
6002
|
|
|
5992
|
-
const version = "1.37.
|
|
6003
|
+
const version = "1.37.1";
|
|
5993
6004
|
const [major, minor, patch] = version.split('.');
|
|
5994
6005
|
let sdkInfo = {
|
|
5995
6006
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -9466,13 +9477,19 @@ class DynascaleManager {
|
|
|
9466
9477
|
}
|
|
9467
9478
|
get trackSubscriptions() {
|
|
9468
9479
|
const subscriptions = [];
|
|
9469
|
-
|
|
9480
|
+
// Use getParticipantsSnapshot() to bypass the observable pipeline
|
|
9481
|
+
// and avoid stale data caused by shareReplay with no active subscribers
|
|
9482
|
+
const participants = this.callState.getParticipantsSnapshot();
|
|
9483
|
+
const videoTrackSubscriptionOverrides = this.videoTrackSubscriptionOverridesSubject.getValue();
|
|
9484
|
+
for (const p of participants) {
|
|
9485
|
+
if (p.isLocalParticipant)
|
|
9486
|
+
continue;
|
|
9470
9487
|
// NOTE: audio tracks don't have to be requested explicitly
|
|
9471
9488
|
// as the SFU will implicitly subscribe us to all of them,
|
|
9472
9489
|
// once they become available.
|
|
9473
9490
|
if (p.videoDimension && hasVideo(p)) {
|
|
9474
|
-
const override =
|
|
9475
|
-
|
|
9491
|
+
const override = videoTrackSubscriptionOverrides[p.sessionId] ??
|
|
9492
|
+
videoTrackSubscriptionOverrides[globalOverrideKey];
|
|
9476
9493
|
if (override?.enabled !== false) {
|
|
9477
9494
|
subscriptions.push({
|
|
9478
9495
|
userId: p.userId,
|
|
@@ -14891,7 +14908,7 @@ class StreamClient {
|
|
|
14891
14908
|
this.getUserAgent = () => {
|
|
14892
14909
|
if (!this.cachedUserAgent) {
|
|
14893
14910
|
const { clientAppIdentifier = {} } = this.options;
|
|
14894
|
-
const { sdkName = 'js', sdkVersion = "1.37.
|
|
14911
|
+
const { sdkName = 'js', sdkVersion = "1.37.1", ...extras } = clientAppIdentifier;
|
|
14895
14912
|
this.cachedUserAgent = [
|
|
14896
14913
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
14897
14914
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|