@stream-io/video-client 1.13.0 → 1.14.0
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 +14 -0
- package/dist/index.browser.es.js +205 -11
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +207 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +205 -11
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +20 -4
- package/dist/src/gen/coordinator/index.d.ts +904 -515
- package/dist/src/store/CallState.d.ts +47 -5
- package/dist/src/store/rxUtils.d.ts +15 -1
- package/dist/src/types.d.ts +14 -0
- package/package.json +1 -1
- package/src/Call.ts +56 -3
- package/src/client-details.ts +1 -1
- package/src/gen/coordinator/index.ts +902 -514
- package/src/store/CallState.ts +115 -5
- package/src/store/__tests__/CallState.test.ts +101 -0
- package/src/store/rxUtils.ts +23 -1
- package/src/types.ts +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.14.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.13.1...@stream-io/video-client-1.14.0) (2025-01-02)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **closed captions:** Integration in the SDKs ([#1508](https://github.com/GetStream/stream-video-js/issues/1508)) ([bcb8589](https://github.com/GetStream/stream-video-js/commit/bcb85892c0dafcb03f9debf8d2fd361622224166))
|
|
11
|
+
|
|
12
|
+
## [1.13.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.13.0...@stream-io/video-client-1.13.1) (2024-12-20)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **client:** fix the initial value of deviceState in clientDetails ([#1629](https://github.com/GetStream/stream-video-js/issues/1629)) ([afefb67](https://github.com/GetStream/stream-video-js/commit/afefb67a568899e2ce500e6dad36e64b6b0e5a3d))
|
|
18
|
+
|
|
5
19
|
## [1.13.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.12.4...@stream-io/video-client-1.13.0) (2024-12-20)
|
|
6
20
|
|
|
7
21
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -56,6 +56,48 @@ const ChannelConfigWithInfoBlocklistBehaviorEnum = {
|
|
|
56
56
|
BLOCK: 'block',
|
|
57
57
|
SHADOW_BLOCK: 'shadow_block',
|
|
58
58
|
};
|
|
59
|
+
/**
|
|
60
|
+
* All possibility of string to use
|
|
61
|
+
* @export
|
|
62
|
+
*/
|
|
63
|
+
const ChannelOwnCapability = {
|
|
64
|
+
BAN_CHANNEL_MEMBERS: 'ban-channel-members',
|
|
65
|
+
CAST_POLL_VOTE: 'cast-poll-vote',
|
|
66
|
+
CONNECT_EVENTS: 'connect-events',
|
|
67
|
+
CREATE_ATTACHMENT: 'create-attachment',
|
|
68
|
+
CREATE_CALL: 'create-call',
|
|
69
|
+
DELETE_ANY_MESSAGE: 'delete-any-message',
|
|
70
|
+
DELETE_CHANNEL: 'delete-channel',
|
|
71
|
+
DELETE_OWN_MESSAGE: 'delete-own-message',
|
|
72
|
+
FLAG_MESSAGE: 'flag-message',
|
|
73
|
+
FREEZE_CHANNEL: 'freeze-channel',
|
|
74
|
+
JOIN_CALL: 'join-call',
|
|
75
|
+
JOIN_CHANNEL: 'join-channel',
|
|
76
|
+
LEAVE_CHANNEL: 'leave-channel',
|
|
77
|
+
MUTE_CHANNEL: 'mute-channel',
|
|
78
|
+
PIN_MESSAGE: 'pin-message',
|
|
79
|
+
QUERY_POLL_VOTES: 'query-poll-votes',
|
|
80
|
+
QUOTE_MESSAGE: 'quote-message',
|
|
81
|
+
READ_EVENTS: 'read-events',
|
|
82
|
+
SEARCH_MESSAGES: 'search-messages',
|
|
83
|
+
SEND_CUSTOM_EVENTS: 'send-custom-events',
|
|
84
|
+
SEND_LINKS: 'send-links',
|
|
85
|
+
SEND_MESSAGE: 'send-message',
|
|
86
|
+
SEND_POLL: 'send-poll',
|
|
87
|
+
SEND_REACTION: 'send-reaction',
|
|
88
|
+
SEND_REPLY: 'send-reply',
|
|
89
|
+
SEND_TYPING_EVENTS: 'send-typing-events',
|
|
90
|
+
SET_CHANNEL_COOLDOWN: 'set-channel-cooldown',
|
|
91
|
+
SKIP_SLOW_MODE: 'skip-slow-mode',
|
|
92
|
+
SLOW_MODE: 'slow-mode',
|
|
93
|
+
TYPING_EVENTS: 'typing-events',
|
|
94
|
+
UPDATE_ANY_MESSAGE: 'update-any-message',
|
|
95
|
+
UPDATE_CHANNEL: 'update-channel',
|
|
96
|
+
UPDATE_CHANNEL_MEMBERS: 'update-channel-members',
|
|
97
|
+
UPDATE_OWN_MESSAGE: 'update-own-message',
|
|
98
|
+
UPDATE_THREAD: 'update-thread',
|
|
99
|
+
UPLOAD_FILE: 'upload-file',
|
|
100
|
+
};
|
|
59
101
|
/**
|
|
60
102
|
* @export
|
|
61
103
|
*/
|
|
@@ -95,9 +137,11 @@ const OwnCapability = {
|
|
|
95
137
|
SEND_AUDIO: 'send-audio',
|
|
96
138
|
SEND_VIDEO: 'send-video',
|
|
97
139
|
START_BROADCAST_CALL: 'start-broadcast-call',
|
|
140
|
+
START_CLOSED_CAPTIONS_CALL: 'start-closed-captions-call',
|
|
98
141
|
START_RECORD_CALL: 'start-record-call',
|
|
99
142
|
START_TRANSCRIPTION_CALL: 'start-transcription-call',
|
|
100
143
|
STOP_BROADCAST_CALL: 'stop-broadcast-call',
|
|
144
|
+
STOP_CLOSED_CAPTIONS_CALL: 'stop-closed-captions-call',
|
|
101
145
|
STOP_RECORD_CALL: 'stop-record-call',
|
|
102
146
|
STOP_TRANSCRIPTION_CALL: 'stop-transcription-call',
|
|
103
147
|
UPDATE_CALL: 'update-call',
|
|
@@ -128,6 +172,14 @@ const RecordSettingsRequestQualityEnum = {
|
|
|
128
172
|
PORTRAIT_1080X1920: 'portrait-1080x1920',
|
|
129
173
|
PORTRAIT_1440X2560: 'portrait-1440x2560',
|
|
130
174
|
};
|
|
175
|
+
/**
|
|
176
|
+
* @export
|
|
177
|
+
*/
|
|
178
|
+
const TranscriptionSettingsRequestClosedCaptionModeEnum = {
|
|
179
|
+
AVAILABLE: 'available',
|
|
180
|
+
DISABLED: 'disabled',
|
|
181
|
+
AUTO_ON: 'auto-on',
|
|
182
|
+
};
|
|
131
183
|
/**
|
|
132
184
|
* @export
|
|
133
185
|
*/
|
|
@@ -136,6 +188,14 @@ const TranscriptionSettingsRequestModeEnum = {
|
|
|
136
188
|
DISABLED: 'disabled',
|
|
137
189
|
AUTO_ON: 'auto-on',
|
|
138
190
|
};
|
|
191
|
+
/**
|
|
192
|
+
* @export
|
|
193
|
+
*/
|
|
194
|
+
const TranscriptionSettingsResponseClosedCaptionModeEnum = {
|
|
195
|
+
AVAILABLE: 'available',
|
|
196
|
+
DISABLED: 'disabled',
|
|
197
|
+
AUTO_ON: 'auto-on',
|
|
198
|
+
};
|
|
139
199
|
/**
|
|
140
200
|
* @export
|
|
141
201
|
*/
|
|
@@ -3299,7 +3359,7 @@ const retryable = async (rpc, signal) => {
|
|
|
3299
3359
|
return result;
|
|
3300
3360
|
};
|
|
3301
3361
|
|
|
3302
|
-
const version = "1.
|
|
3362
|
+
const version = "1.14.0";
|
|
3303
3363
|
const [major, minor, patch] = version.split('.');
|
|
3304
3364
|
let sdkInfo = {
|
|
3305
3365
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -3310,7 +3370,7 @@ let sdkInfo = {
|
|
|
3310
3370
|
let osInfo;
|
|
3311
3371
|
let deviceInfo;
|
|
3312
3372
|
let webRtcInfo;
|
|
3313
|
-
let deviceState;
|
|
3373
|
+
let deviceState = { oneofKind: undefined };
|
|
3314
3374
|
const setSdkInfo = (info) => {
|
|
3315
3375
|
sdkInfo = info;
|
|
3316
3376
|
};
|
|
@@ -4101,6 +4161,24 @@ const setCurrentValue = (subject, update) => {
|
|
|
4101
4161
|
subject.next(next);
|
|
4102
4162
|
return next;
|
|
4103
4163
|
};
|
|
4164
|
+
/**
|
|
4165
|
+
* Updates the value of the provided Subject and returns the previous value
|
|
4166
|
+
* and a function to roll back the update.
|
|
4167
|
+
* This is useful when you want to optimistically update a value
|
|
4168
|
+
* and roll back the update if an error occurs.
|
|
4169
|
+
*
|
|
4170
|
+
* @param subject the subject to update.
|
|
4171
|
+
* @param update the update to apply to the subject.
|
|
4172
|
+
*/
|
|
4173
|
+
const updateValue = (subject, update) => {
|
|
4174
|
+
const lastValue = subject.getValue();
|
|
4175
|
+
const value = setCurrentValue(subject, update);
|
|
4176
|
+
return {
|
|
4177
|
+
lastValue,
|
|
4178
|
+
value,
|
|
4179
|
+
rollback: () => setCurrentValue(subject, lastValue),
|
|
4180
|
+
};
|
|
4181
|
+
};
|
|
4104
4182
|
/**
|
|
4105
4183
|
* Creates a subscription and returns a function to unsubscribe.
|
|
4106
4184
|
*
|
|
@@ -4134,7 +4212,8 @@ var rxUtils = /*#__PURE__*/Object.freeze({
|
|
|
4134
4212
|
createSafeAsyncSubscription: createSafeAsyncSubscription,
|
|
4135
4213
|
createSubscription: createSubscription,
|
|
4136
4214
|
getCurrentValue: getCurrentValue,
|
|
4137
|
-
setCurrentValue: setCurrentValue
|
|
4215
|
+
setCurrentValue: setCurrentValue,
|
|
4216
|
+
updateValue: updateValue
|
|
4138
4217
|
});
|
|
4139
4218
|
|
|
4140
4219
|
/**
|
|
@@ -4581,6 +4660,7 @@ class CallState {
|
|
|
4581
4660
|
this.sessionSubject = new BehaviorSubject(undefined);
|
|
4582
4661
|
this.settingsSubject = new BehaviorSubject(undefined);
|
|
4583
4662
|
this.transcribingSubject = new BehaviorSubject(false);
|
|
4663
|
+
this.captioningSubject = new BehaviorSubject(false);
|
|
4584
4664
|
this.endedBySubject = new BehaviorSubject(undefined);
|
|
4585
4665
|
this.thumbnailsSubject = new BehaviorSubject(undefined);
|
|
4586
4666
|
this.membersSubject = new BehaviorSubject([]);
|
|
@@ -4591,6 +4671,7 @@ class CallState {
|
|
|
4591
4671
|
this.anonymousParticipantCountSubject = new BehaviorSubject(0);
|
|
4592
4672
|
this.participantsSubject = new BehaviorSubject([]);
|
|
4593
4673
|
this.callStatsReportSubject = new BehaviorSubject(undefined);
|
|
4674
|
+
this.closedCaptionsSubject = new BehaviorSubject([]);
|
|
4594
4675
|
// These are tracks that were delivered to the Subscriber's onTrack event
|
|
4595
4676
|
// that we couldn't associate with a participant yet.
|
|
4596
4677
|
// This happens when the participantJoined event hasn't been received yet.
|
|
@@ -4599,10 +4680,18 @@ class CallState {
|
|
|
4599
4680
|
this.logger = getLogger(['CallState']);
|
|
4600
4681
|
/**
|
|
4601
4682
|
* A list of comparators that are used to sort the participants.
|
|
4602
|
-
*
|
|
4603
|
-
* @private
|
|
4604
4683
|
*/
|
|
4605
4684
|
this.sortParticipantsBy = defaultSortPreset;
|
|
4685
|
+
this.closedCaptionsTasks = new Map();
|
|
4686
|
+
/**
|
|
4687
|
+
* Runs the cleanup tasks.
|
|
4688
|
+
*/
|
|
4689
|
+
this.dispose = () => {
|
|
4690
|
+
for (const [ccKey, taskId] of this.closedCaptionsTasks.entries()) {
|
|
4691
|
+
clearTimeout(taskId);
|
|
4692
|
+
this.closedCaptionsTasks.delete(ccKey);
|
|
4693
|
+
}
|
|
4694
|
+
};
|
|
4606
4695
|
/**
|
|
4607
4696
|
* Sets the list of criteria that are used to sort the participants.
|
|
4608
4697
|
* To disable sorting, you can pass `noopComparator()`.
|
|
@@ -4651,6 +4740,15 @@ class CallState {
|
|
|
4651
4740
|
this.setStartedAt = (startedAt) => {
|
|
4652
4741
|
return this.setCurrentValue(this.startedAtSubject, startedAt);
|
|
4653
4742
|
};
|
|
4743
|
+
/**
|
|
4744
|
+
* Sets the closed captioning state of the current call.
|
|
4745
|
+
*
|
|
4746
|
+
* @internal
|
|
4747
|
+
* @param captioning the closed captioning state.
|
|
4748
|
+
*/
|
|
4749
|
+
this.setCaptioning = (captioning) => {
|
|
4750
|
+
return updateValue(this.captioningSubject, captioning);
|
|
4751
|
+
};
|
|
4654
4752
|
/**
|
|
4655
4753
|
* Sets the number of anonymous participants in the current call.
|
|
4656
4754
|
*
|
|
@@ -4749,7 +4847,6 @@ class CallState {
|
|
|
4749
4847
|
}
|
|
4750
4848
|
const thePatch = typeof patch === 'function' ? patch(participant) : patch;
|
|
4751
4849
|
const updatedParticipant = {
|
|
4752
|
-
// FIXME OL: this is not a deep merge, we might want to revisit this
|
|
4753
4850
|
...participant,
|
|
4754
4851
|
...thePatch,
|
|
4755
4852
|
};
|
|
@@ -4811,7 +4908,6 @@ class CallState {
|
|
|
4811
4908
|
*
|
|
4812
4909
|
* @param trackType the kind of subscription to update.
|
|
4813
4910
|
* @param changes the list of subscription changes to do.
|
|
4814
|
-
* @param type the debounce type to use for the update.
|
|
4815
4911
|
*/
|
|
4816
4912
|
this.updateParticipantTracks = (trackType, changes) => {
|
|
4817
4913
|
return this.updateParticipants(Object.entries(changes).reduce((acc, [sessionId, change]) => {
|
|
@@ -4914,6 +5010,14 @@ class CallState {
|
|
|
4914
5010
|
}
|
|
4915
5011
|
return orphans;
|
|
4916
5012
|
};
|
|
5013
|
+
/**
|
|
5014
|
+
* Updates the closed captions settings.
|
|
5015
|
+
*
|
|
5016
|
+
* @param config the new closed captions settings.
|
|
5017
|
+
*/
|
|
5018
|
+
this.updateClosedCaptionSettings = (config) => {
|
|
5019
|
+
this.closedCaptionsSettings = { ...this.closedCaptionsSettings, ...config };
|
|
5020
|
+
};
|
|
4917
5021
|
/**
|
|
4918
5022
|
* Updates the call state with the data received from the server.
|
|
4919
5023
|
*
|
|
@@ -4937,6 +5041,7 @@ class CallState {
|
|
|
4937
5041
|
this.updateParticipantCountFromSession(s);
|
|
4938
5042
|
this.setCurrentValue(this.settingsSubject, call.settings);
|
|
4939
5043
|
this.setCurrentValue(this.transcribingSubject, call.transcribing);
|
|
5044
|
+
this.setCurrentValue(this.captioningSubject, call.captioning);
|
|
4940
5045
|
this.setCurrentValue(this.thumbnailsSubject, call.thumbnails);
|
|
4941
5046
|
};
|
|
4942
5047
|
/**
|
|
@@ -5128,6 +5233,35 @@ class CallState {
|
|
|
5128
5233
|
this.setCurrentValue(this.ownCapabilitiesSubject, event.own_capabilities);
|
|
5129
5234
|
}
|
|
5130
5235
|
};
|
|
5236
|
+
this.updateFromClosedCaptions = (event) => {
|
|
5237
|
+
this.setCurrentValue(this.closedCaptionsSubject, (queue) => {
|
|
5238
|
+
const { closed_caption } = event;
|
|
5239
|
+
const keyOf = (c) => `${c.speaker_id}/${c.start_time}`;
|
|
5240
|
+
const currentKey = keyOf(closed_caption);
|
|
5241
|
+
const duplicate = queue.some((caption) => keyOf(caption) === currentKey);
|
|
5242
|
+
if (duplicate)
|
|
5243
|
+
return queue;
|
|
5244
|
+
const nextQueue = [...queue, closed_caption];
|
|
5245
|
+
const { visibilityDurationMs = 2700, maxVisibleCaptions = 2 } = this.closedCaptionsSettings || {};
|
|
5246
|
+
// schedule the removal of the closed caption after the retention time
|
|
5247
|
+
if (visibilityDurationMs > 0) {
|
|
5248
|
+
const taskId = setTimeout(() => {
|
|
5249
|
+
this.setCurrentValue(this.closedCaptionsSubject, (captions) => captions.filter((caption) => caption !== closed_caption));
|
|
5250
|
+
this.closedCaptionsTasks.delete(currentKey);
|
|
5251
|
+
}, visibilityDurationMs);
|
|
5252
|
+
this.closedCaptionsTasks.set(currentKey, taskId);
|
|
5253
|
+
// cancel the cleanup tasks for the closed captions that are no longer in the queue
|
|
5254
|
+
for (let i = 0; i < nextQueue.length - maxVisibleCaptions; i++) {
|
|
5255
|
+
const key = keyOf(nextQueue[i]);
|
|
5256
|
+
const task = this.closedCaptionsTasks.get(key);
|
|
5257
|
+
clearTimeout(task);
|
|
5258
|
+
this.closedCaptionsTasks.delete(key);
|
|
5259
|
+
}
|
|
5260
|
+
}
|
|
5261
|
+
// trim the queue
|
|
5262
|
+
return nextQueue.slice(-maxVisibleCaptions);
|
|
5263
|
+
});
|
|
5264
|
+
};
|
|
5131
5265
|
this.participants$ = this.participantsSubject.asObservable().pipe(
|
|
5132
5266
|
// maintain stable-sort by mutating the participants stored
|
|
5133
5267
|
// in the original subject
|
|
@@ -5154,6 +5288,7 @@ class CallState {
|
|
|
5154
5288
|
this.settings$ = this.settingsSubject.asObservable();
|
|
5155
5289
|
this.endedBy$ = this.endedBySubject.asObservable();
|
|
5156
5290
|
this.thumbnails$ = this.thumbnailsSubject.asObservable();
|
|
5291
|
+
this.closedCaptions$ = this.closedCaptionsSubject.asObservable();
|
|
5157
5292
|
/**
|
|
5158
5293
|
* Performs shallow comparison of two arrays.
|
|
5159
5294
|
* Expects primitive values: [1, 2, 3] is equal to [2, 1, 3].
|
|
@@ -5183,9 +5318,9 @@ class CallState {
|
|
|
5183
5318
|
this.participantCount$ = duc(this.participantCountSubject);
|
|
5184
5319
|
this.recording$ = duc(this.recordingSubject);
|
|
5185
5320
|
this.transcribing$ = duc(this.transcribingSubject);
|
|
5321
|
+
this.captioning$ = duc(this.captioningSubject);
|
|
5186
5322
|
this.eventHandlers = {
|
|
5187
5323
|
// these events are not updating the call state:
|
|
5188
|
-
'call.closed_caption': undefined,
|
|
5189
5324
|
'call.deleted': undefined,
|
|
5190
5325
|
'call.permission_request': undefined,
|
|
5191
5326
|
'call.recording_ready': undefined,
|
|
@@ -5206,6 +5341,16 @@ class CallState {
|
|
|
5206
5341
|
// events that update call state:
|
|
5207
5342
|
'call.accepted': (e) => this.updateFromCallResponse(e.call),
|
|
5208
5343
|
'call.blocked_user': this.blockUser,
|
|
5344
|
+
'call.closed_caption': this.updateFromClosedCaptions,
|
|
5345
|
+
'call.closed_captions_failed': () => {
|
|
5346
|
+
this.setCurrentValue(this.captioningSubject, false);
|
|
5347
|
+
},
|
|
5348
|
+
'call.closed_captions_started': () => {
|
|
5349
|
+
this.setCurrentValue(this.captioningSubject, true);
|
|
5350
|
+
},
|
|
5351
|
+
'call.closed_captions_stopped': () => {
|
|
5352
|
+
this.setCurrentValue(this.captioningSubject, false);
|
|
5353
|
+
},
|
|
5209
5354
|
'call.created': (e) => this.updateFromCallResponse(e.call),
|
|
5210
5355
|
'call.ended': (e) => {
|
|
5211
5356
|
this.updateFromCallResponse(e.call);
|
|
@@ -5263,6 +5408,12 @@ class CallState {
|
|
|
5263
5408
|
get startedAt() {
|
|
5264
5409
|
return this.getCurrentValue(this.startedAt$);
|
|
5265
5410
|
}
|
|
5411
|
+
/**
|
|
5412
|
+
* Returns whether closed captions are enabled in the current call.
|
|
5413
|
+
*/
|
|
5414
|
+
get captioning() {
|
|
5415
|
+
return this.getCurrentValue(this.captioning$);
|
|
5416
|
+
}
|
|
5266
5417
|
/**
|
|
5267
5418
|
* The server-side counted number of anonymous participants connected to the current call.
|
|
5268
5419
|
* This number includes the anonymous participants as well.
|
|
@@ -5426,6 +5577,12 @@ class CallState {
|
|
|
5426
5577
|
get thumbnails() {
|
|
5427
5578
|
return this.getCurrentValue(this.thumbnails$);
|
|
5428
5579
|
}
|
|
5580
|
+
/**
|
|
5581
|
+
* Returns the current queue of closed captions.
|
|
5582
|
+
*/
|
|
5583
|
+
get closedCaptions() {
|
|
5584
|
+
return this.getCurrentValue(this.closedCaptions$);
|
|
5585
|
+
}
|
|
5429
5586
|
}
|
|
5430
5587
|
|
|
5431
5588
|
const getRtpMap = (line) => {
|
|
@@ -10203,6 +10360,7 @@ class Call {
|
|
|
10203
10360
|
this.sfuClient = undefined;
|
|
10204
10361
|
this.dynascaleManager.setSfuClient(undefined);
|
|
10205
10362
|
this.state.setCallingState(CallingState.LEFT);
|
|
10363
|
+
this.state.dispose();
|
|
10206
10364
|
// Call all leave call hooks, e.g. to clean up global event handlers
|
|
10207
10365
|
this.leaveCallHooks.forEach((hook) => hook());
|
|
10208
10366
|
this.initialized = false;
|
|
@@ -11160,7 +11318,43 @@ class Call {
|
|
|
11160
11318
|
return this.streamClient.post(`${this.streamClientBasePath}/stop_transcription`);
|
|
11161
11319
|
};
|
|
11162
11320
|
/**
|
|
11163
|
-
*
|
|
11321
|
+
* Starts the closed captions of the call.
|
|
11322
|
+
*/
|
|
11323
|
+
this.startClosedCaptions = async (options) => {
|
|
11324
|
+
const trx = this.state.setCaptioning(true); // optimistic update
|
|
11325
|
+
try {
|
|
11326
|
+
return await this.streamClient.post(`${this.streamClientBasePath}/start_closed_captions`, options);
|
|
11327
|
+
}
|
|
11328
|
+
catch (err) {
|
|
11329
|
+
trx.rollback(); // revert the optimistic update
|
|
11330
|
+
throw err;
|
|
11331
|
+
}
|
|
11332
|
+
};
|
|
11333
|
+
/**
|
|
11334
|
+
* Stops the closed captions of the call.
|
|
11335
|
+
*/
|
|
11336
|
+
this.stopClosedCaptions = async (options) => {
|
|
11337
|
+
const trx = this.state.setCaptioning(false); // optimistic update
|
|
11338
|
+
try {
|
|
11339
|
+
return await this.streamClient.post(`${this.streamClientBasePath}/stop_closed_captions`, options);
|
|
11340
|
+
}
|
|
11341
|
+
catch (err) {
|
|
11342
|
+
trx.rollback(); // revert the optimistic update
|
|
11343
|
+
throw err;
|
|
11344
|
+
}
|
|
11345
|
+
};
|
|
11346
|
+
/**
|
|
11347
|
+
* Updates the closed caption settings.
|
|
11348
|
+
*
|
|
11349
|
+
* @param config the closed caption settings to apply
|
|
11350
|
+
*/
|
|
11351
|
+
this.updateClosedCaptionSettings = (config) => {
|
|
11352
|
+
this.state.updateClosedCaptionSettings(config);
|
|
11353
|
+
};
|
|
11354
|
+
/**
|
|
11355
|
+
* Sends a `call.permission_request` event to all users connected to the call.
|
|
11356
|
+
* The call settings object contains information about which permissions can be requested during a call
|
|
11357
|
+
* (for example, a user might be allowed to request permission to publish audio, but not video).
|
|
11164
11358
|
*/
|
|
11165
11359
|
this.requestPermissions = async (data) => {
|
|
11166
11360
|
const { permissions } = data;
|
|
@@ -12894,7 +13088,7 @@ class StreamClient {
|
|
|
12894
13088
|
return await this.wsConnection.connect(this.defaultWSTimeout);
|
|
12895
13089
|
};
|
|
12896
13090
|
this.getUserAgent = () => {
|
|
12897
|
-
const version = "1.
|
|
13091
|
+
const version = "1.14.0";
|
|
12898
13092
|
return (this.userAgent ||
|
|
12899
13093
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
12900
13094
|
};
|
|
@@ -13403,5 +13597,5 @@ class StreamVideoClient {
|
|
|
13403
13597
|
}
|
|
13404
13598
|
StreamVideoClient._instanceMap = new Map();
|
|
13405
13599
|
|
|
13406
|
-
export { AudioSettingsRequestDefaultDeviceEnum, AudioSettingsResponseDefaultDeviceEnum, BlockListOptionsBehaviorEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, ChannelConfigWithInfoAutomodBehaviorEnum, ChannelConfigWithInfoAutomodEnum, ChannelConfigWithInfoBlocklistBehaviorEnum, CreateDeviceRequestPushProviderEnum, DebounceType, DynascaleManager, ErrorFromResponse, InputMediaDeviceManager, InputMediaDeviceManagerState, MicrophoneManager, MicrophoneManagerState, NoiseCancellationSettingsModeEnum, OwnCapability, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, models as SfuModels, SpeakerManager, SpeakerState, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoWriteableStateStore, TranscriptionSettingsRequestModeEnum, TranscriptionSettingsResponseModeEnum, VideoSettingsRequestCameraFacingEnum, VideoSettingsResponseCameraFacingEnum, ViewportTracker, VisibilityState, checkIfAudioOutputChangeSupported, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, deviceIds$, disposeOfMediaStream, dominantSpeaker, getAudioBrowserPermission, getAudioDevices, getAudioOutputDevices, getAudioStream, getClientDetails, getDeviceInfo, getDeviceState, getLogLevel, getLogger, getOSInfo, getScreenShareStream, getSdkInfo, getVideoBrowserPermission, getVideoDevices, getVideoStream, getWebRTCInfo, hasAudio, hasScreenShare, hasScreenShareAudio, hasVideo, isPinned, livestreamOrAudioRoomSortPreset, logLevels, logToConsole, name, noopComparator, paginatedLayoutSortPreset, pinned, publishingAudio, publishingVideo, reactionType, role, screenSharing, setDeviceInfo, setLogLevel, setLogger, setOSInfo, setPowerState, setSdkInfo, setThermalState, setWebRTCInfo, speakerLayoutSortPreset, speaking };
|
|
13600
|
+
export { AudioSettingsRequestDefaultDeviceEnum, AudioSettingsResponseDefaultDeviceEnum, BlockListOptionsBehaviorEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, ChannelConfigWithInfoAutomodBehaviorEnum, ChannelConfigWithInfoAutomodEnum, ChannelConfigWithInfoBlocklistBehaviorEnum, ChannelOwnCapability, CreateDeviceRequestPushProviderEnum, DebounceType, DynascaleManager, ErrorFromResponse, InputMediaDeviceManager, InputMediaDeviceManagerState, MicrophoneManager, MicrophoneManagerState, NoiseCancellationSettingsModeEnum, OwnCapability, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, models as SfuModels, SpeakerManager, SpeakerState, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoWriteableStateStore, TranscriptionSettingsRequestClosedCaptionModeEnum, TranscriptionSettingsRequestModeEnum, TranscriptionSettingsResponseClosedCaptionModeEnum, TranscriptionSettingsResponseModeEnum, VideoSettingsRequestCameraFacingEnum, VideoSettingsResponseCameraFacingEnum, ViewportTracker, VisibilityState, checkIfAudioOutputChangeSupported, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, deviceIds$, disposeOfMediaStream, dominantSpeaker, getAudioBrowserPermission, getAudioDevices, getAudioOutputDevices, getAudioStream, getClientDetails, getDeviceInfo, getDeviceState, getLogLevel, getLogger, getOSInfo, getScreenShareStream, getSdkInfo, getVideoBrowserPermission, getVideoDevices, getVideoStream, getWebRTCInfo, hasAudio, hasScreenShare, hasScreenShareAudio, hasVideo, isPinned, livestreamOrAudioRoomSortPreset, logLevels, logToConsole, name, noopComparator, paginatedLayoutSortPreset, pinned, publishingAudio, publishingVideo, reactionType, role, screenSharing, setDeviceInfo, setLogLevel, setLogger, setOSInfo, setPowerState, setSdkInfo, setThermalState, setWebRTCInfo, speakerLayoutSortPreset, speaking };
|
|
13407
13601
|
//# sourceMappingURL=index.browser.es.js.map
|