@stream-io/video-client 0.0.31 → 0.0.33
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 +9 -0
- package/dist/index.browser.es.js +6 -56
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +6 -56
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +6 -56
- package/dist/index.es.js.map +1 -1
- package/dist/src/events/call-permissions.d.ts +0 -5
- package/dist/src/gen/video/sfu/event/events.d.ts +0 -4
- package/dist/src/gen/video/sfu/models/models.d.ts +4 -8
- package/dist/src/store/CallState.d.ts +1 -23
- package/package.json +1 -1
- package/src/events/__tests__/call-permissions.test.ts +0 -36
- package/src/events/call-permissions.ts +0 -14
- package/src/events/callEventHandlers.ts +1 -2
- package/src/gen/video/sfu/event/events.ts +1 -12
- package/src/gen/video/sfu/models/models.ts +4 -8
- package/src/store/CallState.ts +0 -37
package/dist/index.es.js
CHANGED
|
@@ -835,6 +835,10 @@ var ErrorCode;
|
|
|
835
835
|
* @generated from protobuf enum value: ERROR_CODE_PUBLISH_TRACK_VIDEO_LAYER_NOT_FOUND = 103;
|
|
836
836
|
*/
|
|
837
837
|
ErrorCode[ErrorCode["PUBLISH_TRACK_VIDEO_LAYER_NOT_FOUND"] = 103] = "PUBLISH_TRACK_VIDEO_LAYER_NOT_FOUND";
|
|
838
|
+
/**
|
|
839
|
+
* @generated from protobuf enum value: ERROR_CODE_LIVE_ENDED = 104;
|
|
840
|
+
*/
|
|
841
|
+
ErrorCode[ErrorCode["LIVE_ENDED"] = 104] = "LIVE_ENDED";
|
|
838
842
|
/**
|
|
839
843
|
* @generated from protobuf enum value: ERROR_CODE_PARTICIPANT_NOT_FOUND = 200;
|
|
840
844
|
*/
|
|
@@ -847,14 +851,6 @@ var ErrorCode;
|
|
|
847
851
|
* @generated from protobuf enum value: ERROR_CODE_PARTICIPANT_MIGRATION_FAILED = 202;
|
|
848
852
|
*/
|
|
849
853
|
ErrorCode[ErrorCode["PARTICIPANT_MIGRATION_FAILED"] = 202] = "PARTICIPANT_MIGRATION_FAILED";
|
|
850
|
-
/**
|
|
851
|
-
* @generated from protobuf enum value: ERROR_CODE_PARTICIPANT_MIGRATING = 203;
|
|
852
|
-
*/
|
|
853
|
-
ErrorCode[ErrorCode["PARTICIPANT_MIGRATING"] = 203] = "PARTICIPANT_MIGRATING";
|
|
854
|
-
/**
|
|
855
|
-
* @generated from protobuf enum value: ERROR_CODE_PARTICIPANT_RECONNECT_FAILED = 204;
|
|
856
|
-
*/
|
|
857
|
-
ErrorCode[ErrorCode["PARTICIPANT_RECONNECT_FAILED"] = 204] = "PARTICIPANT_RECONNECT_FAILED";
|
|
858
854
|
/**
|
|
859
855
|
* @generated from protobuf enum value: ERROR_CODE_CALL_NOT_FOUND = 300;
|
|
860
856
|
*/
|
|
@@ -4194,11 +4190,10 @@ class JoinResponse$Type extends MessageType {
|
|
|
4194
4190
|
constructor() {
|
|
4195
4191
|
super('stream.video.sfu.event.JoinResponse', [
|
|
4196
4192
|
{ no: 1, name: 'call_state', kind: 'message', T: () => CallState$1 },
|
|
4197
|
-
{ no: 2, name: 'ice_restart', kind: 'scalar', T: 8 /*ScalarType.BOOL*/ },
|
|
4198
4193
|
]);
|
|
4199
4194
|
}
|
|
4200
4195
|
create(value) {
|
|
4201
|
-
const message = {
|
|
4196
|
+
const message = {};
|
|
4202
4197
|
globalThis.Object.defineProperty(message, MESSAGE_TYPE, {
|
|
4203
4198
|
enumerable: false,
|
|
4204
4199
|
value: this,
|
|
@@ -4215,9 +4210,6 @@ class JoinResponse$Type extends MessageType {
|
|
|
4215
4210
|
case /* stream.video.sfu.models.CallState call_state */ 1:
|
|
4216
4211
|
message.callState = CallState$1.internalBinaryRead(reader, reader.uint32(), options, message.callState);
|
|
4217
4212
|
break;
|
|
4218
|
-
case /* bool ice_restart */ 2:
|
|
4219
|
-
message.iceRestart = reader.bool();
|
|
4220
|
-
break;
|
|
4221
4213
|
default:
|
|
4222
4214
|
let u = options.readUnknownField;
|
|
4223
4215
|
if (u === 'throw')
|
|
@@ -4233,9 +4225,6 @@ class JoinResponse$Type extends MessageType {
|
|
|
4233
4225
|
/* stream.video.sfu.models.CallState call_state = 1; */
|
|
4234
4226
|
if (message.callState)
|
|
4235
4227
|
CallState$1.internalBinaryWrite(message.callState, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
4236
|
-
/* bool ice_restart = 2; */
|
|
4237
|
-
if (message.iceRestart !== false)
|
|
4238
|
-
writer.tag(2, WireType.Varint).bool(message.iceRestart);
|
|
4239
4228
|
let u = options.writeUnknownFields;
|
|
4240
4229
|
if (u !== false)
|
|
4241
4230
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -7557,13 +7546,6 @@ class CallState {
|
|
|
7557
7546
|
* Emits a list of details about recordings performed for the current call.
|
|
7558
7547
|
*/
|
|
7559
7548
|
this.callRecordingListSubject = new BehaviorSubject([]);
|
|
7560
|
-
/**
|
|
7561
|
-
* Emits the latest call permission request sent by any participant of the
|
|
7562
|
-
* current call.
|
|
7563
|
-
*
|
|
7564
|
-
* @internal
|
|
7565
|
-
*/
|
|
7566
|
-
this.callPermissionRequestSubject = new BehaviorSubject(undefined);
|
|
7567
7549
|
/**
|
|
7568
7550
|
* A list of comparators that are used to sort the participants.
|
|
7569
7551
|
*
|
|
@@ -7655,15 +7637,6 @@ class CallState {
|
|
|
7655
7637
|
this.setCallRecordingsList = (recordings) => {
|
|
7656
7638
|
return this.setCurrentValue(this.callRecordingListSubject, recordings);
|
|
7657
7639
|
};
|
|
7658
|
-
/**
|
|
7659
|
-
* Sets the last call permission request.
|
|
7660
|
-
*
|
|
7661
|
-
* @internal
|
|
7662
|
-
* @param request the last call permission request.
|
|
7663
|
-
*/
|
|
7664
|
-
this.setCallPermissionRequest = (request) => {
|
|
7665
|
-
return this.setCurrentValue(this.callPermissionRequestSubject, request);
|
|
7666
|
-
};
|
|
7667
7640
|
/**
|
|
7668
7641
|
* Sets the call stats report.
|
|
7669
7642
|
*
|
|
@@ -7795,8 +7768,6 @@ class CallState {
|
|
|
7795
7768
|
this.anonymousParticipantCount$ =
|
|
7796
7769
|
this.anonymousParticipantCountSubject.asObservable();
|
|
7797
7770
|
this.callStatsReport$ = this.callStatsReportSubject.asObservable();
|
|
7798
|
-
this.callPermissionRequest$ =
|
|
7799
|
-
this.callPermissionRequestSubject.asObservable();
|
|
7800
7771
|
this.callRecordingList$ = this.callRecordingListSubject.asObservable();
|
|
7801
7772
|
this.metadata$ = this.metadataSubject.asObservable();
|
|
7802
7773
|
this.members$ = this.membersSubject.asObservable();
|
|
@@ -7872,12 +7843,6 @@ class CallState {
|
|
|
7872
7843
|
get callRecordingsList() {
|
|
7873
7844
|
return this.getCurrentValue(this.callRecordingList$);
|
|
7874
7845
|
}
|
|
7875
|
-
/**
|
|
7876
|
-
* The last call permission request.
|
|
7877
|
-
*/
|
|
7878
|
-
get callPermissionRequest() {
|
|
7879
|
-
return this.getCurrentValue(this.callPermissionRequest$);
|
|
7880
|
-
}
|
|
7881
7846
|
/**
|
|
7882
7847
|
* The call stats report.
|
|
7883
7848
|
*/
|
|
@@ -7993,20 +7958,6 @@ const watchCallUpdated = (state) => {
|
|
|
7993
7958
|
};
|
|
7994
7959
|
};
|
|
7995
7960
|
|
|
7996
|
-
/**
|
|
7997
|
-
* Event handler that watches for `call.permission_request` events
|
|
7998
|
-
* Updates the state store using the `callPermissionRequest$` stream
|
|
7999
|
-
*/
|
|
8000
|
-
const watchCallPermissionRequest = (state) => {
|
|
8001
|
-
return function onCallPermissionRequest(event) {
|
|
8002
|
-
if (event.type !== 'call.permission_request')
|
|
8003
|
-
return;
|
|
8004
|
-
const { localParticipant } = state;
|
|
8005
|
-
if (event.user.id !== (localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.userId)) {
|
|
8006
|
-
state.setCallPermissionRequest(event);
|
|
8007
|
-
}
|
|
8008
|
-
};
|
|
8009
|
-
};
|
|
8010
7961
|
/**
|
|
8011
7962
|
* Event handler that watches for `call.permissions_updated` events
|
|
8012
7963
|
*/
|
|
@@ -8469,7 +8420,6 @@ const registerEventHandlers = (call, state, dispatcher) => {
|
|
|
8469
8420
|
'call.member_removed': watchCallMemberRemoved(state),
|
|
8470
8421
|
'call.member_updated': watchCallMemberUpdated(state),
|
|
8471
8422
|
'call.member_updated_permission': watchCallMemberUpdatedPermission(state),
|
|
8472
|
-
'call.permission_request': watchCallPermissionRequest(state),
|
|
8473
8423
|
'call.permissions_updated': watchCallPermissionsUpdated(state),
|
|
8474
8424
|
'call.reaction_new': watchNewReactions(state),
|
|
8475
8425
|
'call.recording_started': watchCallRecordingStarted(state),
|
|
@@ -11882,7 +11832,7 @@ class StreamClient {
|
|
|
11882
11832
|
}
|
|
11883
11833
|
getUserAgent() {
|
|
11884
11834
|
return (this.userAgent ||
|
|
11885
|
-
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${"0.0.
|
|
11835
|
+
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${"0.0.32"}`);
|
|
11886
11836
|
}
|
|
11887
11837
|
setUserAgent(userAgent) {
|
|
11888
11838
|
this.userAgent = userAgent;
|