@stream-io/video-client 0.0.13 → 0.0.14
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 +11 -6
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +11 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +11 -6
- package/dist/index.es.js.map +1 -1
- package/dist/src/types.d.ts +1 -1
- package/package.json +1 -1
- package/src/Call.ts +8 -2
- package/src/events/__tests__/call-permissions.test.ts +2 -2
- package/src/rtc/__tests__/publisher.test.ts +1 -1
- package/src/stats/state-store-stats-reporter.ts +3 -1
- package/src/store/CallState.ts +1 -1
- package/src/types.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
### [0.0.14](https://github.com/GetStream/stream-video-js/compare/client0.0.13...client0.0.14) (2023-06-16)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **client:** do not allow to re-join left call ([#646](https://github.com/GetStream/stream-video-js/issues/646)) ([cbbbdfd](https://github.com/GetStream/stream-video-js/commit/cbbbdfd026c13673f98ccb50e8ee84140eec64b6))
|
|
11
|
+
|
|
5
12
|
### [0.0.13](https://github.com/GetStream/stream-video-js/compare/client0.0.12...client0.0.13) (2023-06-15)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -4246,7 +4246,7 @@ var DebounceType;
|
|
|
4246
4246
|
DebounceType[DebounceType["SLOW"] = 1200] = "SLOW";
|
|
4247
4247
|
})(DebounceType || (DebounceType = {}));
|
|
4248
4248
|
const isStreamVideoLocalParticipant = (p) => {
|
|
4249
|
-
return !!p.
|
|
4249
|
+
return !!p.isLocalParticipant;
|
|
4250
4250
|
};
|
|
4251
4251
|
|
|
4252
4252
|
/******************************************************************************
|
|
@@ -7025,7 +7025,7 @@ class CallState {
|
|
|
7025
7025
|
};
|
|
7026
7026
|
this.participants$ = this.participantsSubject.pipe(map$1((ps) => ps.sort(this.sortParticipantsBy)));
|
|
7027
7027
|
this.localParticipant$ = this.participants$.pipe(map$1((participants) => participants.find(isStreamVideoLocalParticipant)));
|
|
7028
|
-
this.remoteParticipants$ = this.participants$.pipe(map$1((participants) => participants.filter((p) => !p.
|
|
7028
|
+
this.remoteParticipants$ = this.participants$.pipe(map$1((participants) => participants.filter((p) => !p.isLocalParticipant)));
|
|
7029
7029
|
this.pinnedParticipants$ = this.participants$.pipe(map$1((participants) => participants.filter((p) => p.pinnedAt)));
|
|
7030
7030
|
this.dominantSpeaker$ = this.participants$.pipe(map$1((participants) => participants.find((p) => p.isDominantSpeaker)));
|
|
7031
7031
|
this.hasOngoingScreenShare$ = this.participants$.pipe(map$1((participants) => {
|
|
@@ -7874,7 +7874,9 @@ const createStatsReporter = ({ subscriber, publisher, state, edgeName, pollingIn
|
|
|
7874
7874
|
for (let participant of state.participants) {
|
|
7875
7875
|
if (!sessionIds.has(participant.sessionId))
|
|
7876
7876
|
continue;
|
|
7877
|
-
const kind = participant.
|
|
7877
|
+
const kind = participant.isLocalParticipant
|
|
7878
|
+
? 'publisher'
|
|
7879
|
+
: 'subscriber';
|
|
7878
7880
|
try {
|
|
7879
7881
|
const mergedStream = new MediaStream([
|
|
7880
7882
|
...(((_a = participant.videoStream) === null || _a === void 0 ? void 0 : _a.getVideoTracks()) || []),
|
|
@@ -8467,6 +8469,9 @@ class Call {
|
|
|
8467
8469
|
if ([CallingState.JOINED, CallingState.JOINING].includes(this.state.callingState)) {
|
|
8468
8470
|
throw new Error(`Illegal State: Already joined.`);
|
|
8469
8471
|
}
|
|
8472
|
+
if (this.state.callingState === CallingState.LEFT) {
|
|
8473
|
+
throw new Error('Illegal State: Cannot join already left call. Create a new Call instance to join a call.');
|
|
8474
|
+
}
|
|
8470
8475
|
const previousCallingState = this.state.callingState;
|
|
8471
8476
|
this.state.setCallingState(CallingState.JOINING);
|
|
8472
8477
|
if ((data === null || data === void 0 ? void 0 : data.ring) && !this.ringing) {
|
|
@@ -8663,7 +8668,7 @@ class Call {
|
|
|
8663
8668
|
const startedAt = (callState === null || callState === void 0 ? void 0 : callState.startedAt)
|
|
8664
8669
|
? Timestamp.toDate(callState.startedAt)
|
|
8665
8670
|
: new Date();
|
|
8666
|
-
this.state.setParticipants(currentParticipants.map((participant) => (Object.assign(Object.assign({}, participant), {
|
|
8671
|
+
this.state.setParticipants(currentParticipants.map((participant) => (Object.assign(Object.assign({}, participant), { isLocalParticipant: participant.sessionId === sfuClient.sessionId, viewportVisibilityState: VisibilityState.UNKNOWN }))));
|
|
8667
8672
|
this.state.setParticipantCount((participantCount === null || participantCount === void 0 ? void 0 : participantCount.total) || 0);
|
|
8668
8673
|
this.state.setAnonymousParticipantCount((participantCount === null || participantCount === void 0 ? void 0 : participantCount.anonymous) || 0);
|
|
8669
8674
|
this.state.setStartedAt(startedAt);
|
|
@@ -8797,7 +8802,7 @@ class Call {
|
|
|
8797
8802
|
const subscriptions = [];
|
|
8798
8803
|
participants.forEach((p) => {
|
|
8799
8804
|
// we don't want to subscribe to our own tracks
|
|
8800
|
-
if (p.
|
|
8805
|
+
if (p.isLocalParticipant)
|
|
8801
8806
|
return;
|
|
8802
8807
|
// NOTE: audio tracks don't have to be requested explicitly
|
|
8803
8808
|
// as the SFU will implicitly subscribe us to all of them,
|
|
@@ -11002,7 +11007,7 @@ class StreamClient {
|
|
|
11002
11007
|
}
|
|
11003
11008
|
getUserAgent() {
|
|
11004
11009
|
return (this.userAgent ||
|
|
11005
|
-
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${"0.0.
|
|
11010
|
+
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${"0.0.13"}`);
|
|
11006
11011
|
}
|
|
11007
11012
|
setUserAgent(userAgent) {
|
|
11008
11013
|
this.userAgent = userAgent;
|