@stream-io/video-client 0.0.40 → 0.0.41
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 +19 -8
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +19 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +19 -8
- package/dist/index.es.js.map +1 -1
- package/dist/src/events/internal.d.ts +1 -0
- package/package.json +1 -1
- package/src/StreamSfuClient.ts +1 -1
- package/src/StreamVideoClient.ts +4 -1
- package/src/events/callEventHandlers.ts +2 -0
- package/src/events/internal.ts +15 -0
- package/src/rtc/Publisher.ts +3 -3
- package/src/rtc/Subscriber.ts +1 -1
- package/src/stats/state-store-stats-reporter.ts +1 -1
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.41](https://github.com/GetStream/stream-video-js/compare/client0.0.40...client0.0.41) (2023-07-10)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Documentation
|
|
9
|
+
|
|
10
|
+
* **react-sdk:** add token snippet to audio rooms tutorial ([#739](https://github.com/GetStream/stream-video-js/issues/739)) ([bf0b46c](https://github.com/GetStream/stream-video-js/commit/bf0b46ce40329458ad545c82b70a4099c4afc8f2))
|
|
11
|
+
|
|
5
12
|
### [0.0.40](https://github.com/GetStream/stream-video-js/compare/client0.0.39...client0.0.40) (2023-07-07)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -6280,7 +6280,7 @@ class Publisher {
|
|
|
6280
6280
|
this.onIceCandidate = (e) => __awaiter(this, void 0, void 0, function* () {
|
|
6281
6281
|
const { candidate } = e;
|
|
6282
6282
|
if (!candidate) {
|
|
6283
|
-
this.logger('
|
|
6283
|
+
this.logger('debug', 'null ice candidate');
|
|
6284
6284
|
return;
|
|
6285
6285
|
}
|
|
6286
6286
|
yield this.sfuClient.iceTrickle({
|
|
@@ -6440,10 +6440,10 @@ class Publisher {
|
|
|
6440
6440
|
this.logger('error', `ICE Candidate error`, errorMessage);
|
|
6441
6441
|
};
|
|
6442
6442
|
this.onIceConnectionStateChange = () => {
|
|
6443
|
-
this.logger('
|
|
6443
|
+
this.logger('debug', `ICE Connection state changed`, this.pc.iceConnectionState);
|
|
6444
6444
|
};
|
|
6445
6445
|
this.onIceGatheringStateChange = () => {
|
|
6446
|
-
this.logger('
|
|
6446
|
+
this.logger('debug', `ICE Gathering State`, this.pc.iceGatheringState);
|
|
6447
6447
|
};
|
|
6448
6448
|
this.onSignalingStateChange = () => {
|
|
6449
6449
|
this.logger('debug', `Signaling state changed`, this.pc.signalingState);
|
|
@@ -6610,7 +6610,7 @@ class Subscriber {
|
|
|
6610
6610
|
this.onIceCandidate = (e) => __awaiter(this, void 0, void 0, function* () {
|
|
6611
6611
|
const { candidate } = e;
|
|
6612
6612
|
if (!candidate) {
|
|
6613
|
-
logger$1('
|
|
6613
|
+
logger$1('debug', 'null ice candidate');
|
|
6614
6614
|
return;
|
|
6615
6615
|
}
|
|
6616
6616
|
yield this.sfuClient.iceTrickle({
|
|
@@ -6919,7 +6919,7 @@ class StreamSfuClient {
|
|
|
6919
6919
|
if (this.lastMessageTimestamp) {
|
|
6920
6920
|
const timeSinceLastMessage = new Date().getTime() - this.lastMessageTimestamp.getTime();
|
|
6921
6921
|
if (timeSinceLastMessage > this.unhealthyTimeoutInMs) {
|
|
6922
|
-
this.logger('
|
|
6922
|
+
this.logger('debug', 'SFU connection unhealthy, closing');
|
|
6923
6923
|
this.close(4001, `SFU connection unhealthy. Didn't receive any healthcheck messages for ${this.unhealthyTimeoutInMs}ms`);
|
|
6924
6924
|
}
|
|
6925
6925
|
}
|
|
@@ -8026,6 +8026,16 @@ const watchParticipantCountChanged = (dispatcher, state) => {
|
|
|
8026
8026
|
}
|
|
8027
8027
|
});
|
|
8028
8028
|
};
|
|
8029
|
+
const watchLiveEnded = (dispatcher, call) => {
|
|
8030
|
+
return dispatcher.on('error', (e) => {
|
|
8031
|
+
if (e.eventPayload.oneofKind !== 'error' ||
|
|
8032
|
+
!e.eventPayload.error.error ||
|
|
8033
|
+
e.eventPayload.error.error.code !== ErrorCode.LIVE_ENDED)
|
|
8034
|
+
return;
|
|
8035
|
+
if (!call.permissionsContext.hasPermission(OwnCapability.JOIN_BACKSTAGE))
|
|
8036
|
+
call.leave();
|
|
8037
|
+
});
|
|
8038
|
+
};
|
|
8029
8039
|
/**
|
|
8030
8040
|
* Watches and logs the errors reported by the currently connected SFU.
|
|
8031
8041
|
*/
|
|
@@ -8415,6 +8425,7 @@ const registerEventHandlers = (call, state, dispatcher) => {
|
|
|
8415
8425
|
'call.user_muted': () => console.log('call.user_muted received'),
|
|
8416
8426
|
};
|
|
8417
8427
|
const eventHandlers = [
|
|
8428
|
+
watchLiveEnded(dispatcher, call),
|
|
8418
8429
|
watchSfuErrorReports(dispatcher),
|
|
8419
8430
|
watchChangePublishQuality(dispatcher, call),
|
|
8420
8431
|
watchConnectionQualityChanged(dispatcher, state),
|
|
@@ -8673,7 +8684,7 @@ const createStatsReporter = ({ subscriber, publisher, state, pollingIntervalInMs
|
|
|
8673
8684
|
if (pollingIntervalInMs > 0) {
|
|
8674
8685
|
const loop = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
8675
8686
|
yield run().catch((e) => {
|
|
8676
|
-
logger('
|
|
8687
|
+
logger('debug', 'Failed to collect stats', e);
|
|
8677
8688
|
});
|
|
8678
8689
|
timeoutId = setTimeout(loop, pollingIntervalInMs);
|
|
8679
8690
|
});
|
|
@@ -11742,7 +11753,7 @@ class StreamClient {
|
|
|
11742
11753
|
};
|
|
11743
11754
|
this.getUserAgent = () => {
|
|
11744
11755
|
return (this.userAgent ||
|
|
11745
|
-
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${"0.0.
|
|
11756
|
+
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${"0.0.40"}`);
|
|
11746
11757
|
};
|
|
11747
11758
|
this.setUserAgent = (userAgent) => {
|
|
11748
11759
|
this.userAgent = userAgent;
|
|
@@ -12167,7 +12178,7 @@ class StreamVideoClient {
|
|
|
12167
12178
|
return;
|
|
12168
12179
|
const { call, members } = event;
|
|
12169
12180
|
if (userToConnect.id === call.created_by.id) {
|
|
12170
|
-
this.logger('
|
|
12181
|
+
this.logger('debug', 'Received `call.ring` sent by the current user so ignoring the event');
|
|
12171
12182
|
return;
|
|
12172
12183
|
}
|
|
12173
12184
|
// The call might already be tracked by the client,
|