@stream-io/video-client 0.1.0 → 0.1.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 +5 -13
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +5 -13
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +5 -13
- package/dist/index.es.js.map +1 -1
- package/dist/src/gen/coordinator/index.d.ts +12 -24
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/events/__tests__/sessions.test.ts +14 -12
- package/src/events/sessions.ts +4 -12
- package/src/gen/coordinator/index.ts +12 -24
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.1.1](https://github.com/GetStream/stream-video-js/compare/client0.1.0...client0.1.1) (2023-07-18)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **sessions:** update to the new call.session event models ([#806](https://github.com/GetStream/stream-video-js/issues/806)) ([2966837](https://github.com/GetStream/stream-video-js/commit/296683789823a8dd12e99193f6baaf971824ae83))
|
|
11
|
+
|
|
5
12
|
## [0.1.0](https://github.com/GetStream/stream-video-js/compare/client0.0.51...client0.1.0) (2023-07-17)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -8378,7 +8378,7 @@ const watchCallSessionParticipantJoined = (state) => {
|
|
|
8378
8378
|
return function onCallParticipantJoined(event) {
|
|
8379
8379
|
if (event.type !== 'call.session_participant_joined')
|
|
8380
8380
|
return;
|
|
8381
|
-
const {
|
|
8381
|
+
const { participant } = event;
|
|
8382
8382
|
state.setMetadata((metadata) => {
|
|
8383
8383
|
if (!metadata || !metadata.session) {
|
|
8384
8384
|
state.logger('warn', `Received call.session_participant_joined event but the metadata structure is invalid.`, event);
|
|
@@ -8386,16 +8386,8 @@ const watchCallSessionParticipantJoined = (state) => {
|
|
|
8386
8386
|
}
|
|
8387
8387
|
const { session } = metadata;
|
|
8388
8388
|
const { participants, participants_count_by_role } = session;
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
{
|
|
8392
|
-
// FIXME OL: ideally, this comes from the backend
|
|
8393
|
-
joined_at: new Date().toISOString(),
|
|
8394
|
-
user,
|
|
8395
|
-
role: user.role,
|
|
8396
|
-
user_session_id,
|
|
8397
|
-
},
|
|
8398
|
-
], participants_count_by_role: Object.assign(Object.assign({}, participants_count_by_role), { [user.role]: (participants_count_by_role[user.role] || 0) + 1 }) }) });
|
|
8389
|
+
const { user } = participant;
|
|
8390
|
+
return Object.assign(Object.assign({}, metadata), { session: Object.assign(Object.assign({}, session), { participants: [...participants, participant], participants_count_by_role: Object.assign(Object.assign({}, participants_count_by_role), { [user.role]: (participants_count_by_role[user.role] || 0) + 1 }) }) });
|
|
8399
8391
|
});
|
|
8400
8392
|
};
|
|
8401
8393
|
};
|
|
@@ -8408,7 +8400,7 @@ const watchCallSessionParticipantLeft = (state) => {
|
|
|
8408
8400
|
return function onCallParticipantLeft(event) {
|
|
8409
8401
|
if (event.type !== 'call.session_participant_left')
|
|
8410
8402
|
return;
|
|
8411
|
-
const { user, user_session_id } = event;
|
|
8403
|
+
const { user, user_session_id } = event.participant;
|
|
8412
8404
|
state.setMetadata((metadata) => {
|
|
8413
8405
|
if (!metadata || !metadata.session) {
|
|
8414
8406
|
state.logger('warn', `Received call.session_participant_left event but the metadata structure is invalid.`, event);
|
|
@@ -11325,7 +11317,7 @@ class WSConnectionFallback {
|
|
|
11325
11317
|
}
|
|
11326
11318
|
}
|
|
11327
11319
|
|
|
11328
|
-
const version = '0.1.
|
|
11320
|
+
const version = '0.1.1';
|
|
11329
11321
|
|
|
11330
11322
|
const logger = getLogger(['location']);
|
|
11331
11323
|
const HINT_URL = `https://hint.stream-io-video.com/`;
|