Skip to content

Commit 741e48c

Browse files
committed
feat: add cc start/stop endpoints
1 parent 31ee11a commit 741e48c

File tree

3 files changed

+58
-6
lines changed

3 files changed

+58
-6
lines changed

packages/client/openapitools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"$schema": "../../node_modules/@openapitools/openapi-generator-cli/config.schema.json",
33
"spaces": 2,
44
"generator-cli": {
5-
"version": "7.5.0"
5+
"version": "7.8.0"
66
}
77
}

packages/client/src/Call.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,14 @@ import type {
5555
SendCallEventResponse,
5656
SendReactionRequest,
5757
SendReactionResponse,
58+
StartClosedCaptionsResponse,
5859
StartHLSBroadcastingResponse,
5960
StartRecordingRequest,
6061
StartRecordingResponse,
6162
StartTranscriptionRequest,
6263
StartTranscriptionResponse,
6364
StatsOptions,
65+
StopClosedCaptionsResponse,
6466
StopHLSBroadcastingResponse,
6567
StopLiveResponse,
6668
StopRecordingResponse,
@@ -1699,7 +1701,27 @@ export class Call {
16991701
};
17001702

17011703
/**
1702-
* Sends a `call.permission_request` event to all users connected to the call. The call settings object contains infomration about which permissions can be requested during a call (for example a user might be allowed to request permission to publish audio, but not video).
1704+
* Starts the closed captions of the call.
1705+
*/
1706+
startClosedCaptions = async (): Promise<StartClosedCaptionsResponse> => {
1707+
return this.streamClient.post<StartClosedCaptionsResponse>(
1708+
`${this.streamClientBasePath}/start_closed_captions`,
1709+
);
1710+
};
1711+
1712+
/**
1713+
* Stops the closed captions of the call.
1714+
*/
1715+
stopClosedCaptions = async (): Promise<StopClosedCaptionsResponse> => {
1716+
return this.streamClient.post<StopClosedCaptionsResponse>(
1717+
`${this.streamClientBasePath}/stop_closed_captions`,
1718+
);
1719+
};
1720+
1721+
/**
1722+
* Sends a `call.permission_request` event to all users connected to the call.
1723+
* The call settings object contains information about which permissions can be requested during a call
1724+
* (for example, a user might be allowed to request permission to publish audio, but not video).
17031725
*/
17041726
requestPermissions = async (
17051727
data: RequestPermissionRequest,

packages/client/src/gen/coordinator/index.ts

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ export interface APIError {
4848
* @memberof APIError
4949
*/
5050
more_info: string;
51+
/**
52+
* Flag that indicates if the error is unrecoverable, requests that return unrecoverable errors should not be retried, this error only applies to the request that caused it
53+
* @type {boolean}
54+
* @memberof APIError
55+
*/
56+
unrecoverable?: boolean;
5157
}
5258
/**
5359
*
@@ -1457,7 +1463,6 @@ export interface CallSessionEndedEvent {
14571463
*/
14581464
type: string;
14591465
}
1460-
14611466
/**
14621467
* This event is sent when the participant counts in a call session are updated
14631468
* @export
@@ -4303,9 +4308,11 @@ export const OwnCapability = {
43034308
SEND_AUDIO: 'send-audio',
43044309
SEND_VIDEO: 'send-video',
43054310
START_BROADCAST_CALL: 'start-broadcast-call',
4311+
START_CLOSED_CAPTIONS_CALL: 'start-closed-captions-call',
43064312
START_RECORD_CALL: 'start-record-call',
43074313
START_TRANSCRIPTION_CALL: 'start-transcription-call',
43084314
STOP_BROADCAST_CALL: 'stop-broadcast-call',
4315+
STOP_CLOSED_CAPTIONS_CALL: 'stop-closed-captions-call',
43094316
STOP_RECORD_CALL: 'stop-record-call',
43104317
STOP_TRANSCRIPTION_CALL: 'stop-transcription-call',
43114318
UPDATE_CALL: 'update-call',
@@ -4718,7 +4725,6 @@ export interface PrivacySettings {
47184725
*/
47194726
typing_indicators?: TypingIndicators;
47204727
}
4721-
47224728
/**
47234729
*
47244730
* @export
@@ -4820,7 +4826,6 @@ export interface PushNotificationSettingsResponse {
48204826
*/
48214827
disabled_until?: string;
48224828
}
4823-
48244829
/**
48254830
*
48264831
* @export
@@ -5490,6 +5495,19 @@ export interface SortParamRequest {
54905495
*/
54915496
field?: string;
54925497
}
5498+
/**
5499+
*
5500+
* @export
5501+
* @interface StartClosedCaptionsResponse
5502+
*/
5503+
export interface StartClosedCaptionsResponse {
5504+
/**
5505+
*
5506+
* @type {string}
5507+
* @memberof StartClosedCaptionsResponse
5508+
*/
5509+
duration: string;
5510+
}
54935511
/**
54945512
*
54955513
* @export
@@ -5593,6 +5611,19 @@ export interface StatsOptions {
55935611
*/
55945612
reporting_interval_ms: number;
55955613
}
5614+
/**
5615+
*
5616+
* @export
5617+
* @interface StopClosedCaptionsResponse
5618+
*/
5619+
export interface StopClosedCaptionsResponse {
5620+
/**
5621+
* Duration of the request in milliseconds
5622+
* @type {string}
5623+
* @memberof StopClosedCaptionsResponse
5624+
*/
5625+
duration: string;
5626+
}
55965627
/**
55975628
*
55985629
* @export
@@ -6375,7 +6406,6 @@ export interface UserMuteResponse {
63756406
*/
63766407
user?: UserResponse;
63776408
}
6378-
63796409
/**
63806410
*
63816411
* @export

0 commit comments

Comments
 (0)