-
Notifications
You must be signed in to change notification settings - Fork 186
Vonage Video
Documentation / Vonage Video
This is the Vonage Video SDK for Node.js for use with Vonage APIs. To use it you will need a Vonage account. Sign up for free at vonage.com.
For full API documentation refer to developer.vonage.com.
We recommend using this SDK as part of the overall @vonage/server-sdk
package. Please see the main package for installation.
You can also use this SDK standalone if you only need access to just the Video API.
npm install @vonage/video
yarn add @vonage/video
If you are using this SDK as part of the Vonage Server SDK, you can access it as the video
property off of the client that you instantiate.
const { Auth } = require('@vonage/auth');
const { Vonage } = require('@vonage/server-sdk');
const credentials = new Auth({
apiKey: API_KEY,
apiSecret: API_SECRET
});
const options = {};
const vonage = new Vonage(credentials, options);
const session = await vonage.video.createSession();
The SDK can be used standalone from the main Vonage Server SDK for Node.js if you only need to use the Video API. All you need to do is require('@vonage/video')
, and use the returned object to create your own client.
const { Auth } = require('@vonage/auth');
const { Video } = require('@vonage/video');
const credentials = new Auth({
applicationId: APP_ID,
privateKey: PRIVATE_KEY_PATH,
});
const options = {};
const videoClient = new Video(credentials, options);
Where credentials
is any option from @vonage/auth
, and options
is any option from @vonage/server-client
This SDK uses Promises to return data.
const session = await videoClient.createSession();
Run:
npm test
The following is a list of Vonage Video APIs and whether the SDK provides support for them:
API | Supported? |
---|---|
Session Creation | ✅ |
Signaling | ✅ |
Force Muting | ✅ |
Archiving | ✅ |
SIP Interconnect | ✅ |
Live Streaming Broadcasts | ✅ |
Experience Composer | ✅ |
Defined in: video/lib/types/ArchiveMode.ts:4
Enum representing different archive modes.
Enumeration Member | Value | Description | Defined in |
---|---|---|---|
ALWAYS
|
"always" |
Archive mode set to 'always', where archives are continuously recorded. | video/lib/types/ArchiveMode.ts:13 |
MANUAL
|
"manual" |
Archive mode set to 'manual', where archives are started and stopped manually. | video/lib/types/ArchiveMode.ts:8 |
Defined in: video/lib/enums/ArchiveOutputMode.ts:4
Enum representing different output modes for video archives.
Enumeration Member | Value | Description | Defined in |
---|---|---|---|
COMPOSED
|
"composed" |
Represents the composed output mode where all streams are mixed into one. | video/lib/enums/ArchiveOutputMode.ts:8 |
INDIVIDUAL
|
"individual" |
Represents the individual output mode where each stream is recorded separately. | video/lib/enums/ArchiveOutputMode.ts:13 |
Defined in: video/lib/enums/AudioRate.ts:4
Enum representing different audio sample rates.
Enumeration Member | Value | Description | Defined in |
---|---|---|---|
16KHZ
|
16000 |
Represents an audio sample rate of 16 kHz. | video/lib/enums/AudioRate.ts:8 |
8KHZ
|
8000 |
Represents an audio sample rate of 8 kHz. | video/lib/enums/AudioRate.ts:13 |
Defined in: video/lib/enums/CaptionStatus.ts:4
Enum representing different captioning status.
Enumeration Member | Value | Description | Defined in |
---|---|---|---|
FAILED
|
"failed" |
Indicates that captioning has failed. | video/lib/enums/CaptionStatus.ts:23 |
PAUSED
|
"paused" |
Indicates that captioning has been paused. | video/lib/enums/CaptionStatus.ts:18 |
STARTED
|
"started" |
Indicates that captioning has started. | video/lib/enums/CaptionStatus.ts:8 |
STOPPED
|
"stopped" |
Indicates that captioning has stopped. | video/lib/enums/CaptionStatus.ts:13 |
Defined in: video/lib/enums/ExperienceComposerResolution.ts:6
Enum representing different resolutions for an experience composer.
Enumeration Member | Value | Description | Defined in |
---|---|---|---|
HD_LANDSCAPE
|
"1280x720" |
High definition landscape resolution. | video/lib/enums/ExperienceComposerResolution.ts:20 |
HD_PORTRAIT
|
"720x1280" |
High definition portrait resolution. | video/lib/enums/ExperienceComposerResolution.ts:25 |
SD_LANDSCAPE
|
"640x480" |
Standard definition landscape resolution. | video/lib/enums/ExperienceComposerResolution.ts:10 |
SD_PORTRAIT
|
"480x640" |
Standard definition portrait resolution. | video/lib/enums/ExperienceComposerResolution.ts:15 |
Defined in: video/lib/enums/LayoutType.ts:4
Enum representing different layout types for live streaming broadcasts.
Enumeration Member | Value | Description | Defined in |
---|---|---|---|
BEST_FIT
|
"bestFit" |
Automatically determine the best fit layout. | video/lib/enums/LayoutType.ts:8 |
CUSTOM
|
"custom" |
Use a custom layout for the broadcast. | video/lib/enums/LayoutType.ts:13 |
HORIZONTAL_PRESENTATION
|
"horizontalPresentation" |
Horizontal presentation layout. | video/lib/enums/LayoutType.ts:18 |
PIP
|
"pip" |
Picture-in-picture (PIP) layout. | video/lib/enums/LayoutType.ts:23 |
VERTICAL_PRESENTATION
|
"verticalPresentation" |
Vertical presentation layout. | video/lib/enums/LayoutType.ts:28 |
Defined in: video/lib/enums/MediaMode.ts:4
Enum representing media modes for a session.
Enumeration Member | Value | Description | Defined in |
---|---|---|---|
RELAYED
|
"enabled" |
Relayed mode where media is enabled. | video/lib/enums/MediaMode.ts:13 |
ROUTED
|
"disabled" |
Routed mode where media is disabled. | video/lib/enums/MediaMode.ts:8 |
Defined in: video/lib/enums/Resolution.ts:4
Enum representing different video resolutions for live streaming broadcasts.
Enumeration Member | Value | Description | Defined in |
---|---|---|---|
FHD_LANDSCAPE
|
"1920x1080" |
Full HD landscape resolution (1920x1080 pixels). | video/lib/enums/Resolution.ts:8 |
FHD_PORTRAIT
|
"1080x1920" |
Full HD portrait resolution (1080x1920 pixels). | video/lib/enums/Resolution.ts:13 |
HD_LANDSCAPE
|
"1280x720" |
HD landscape resolution (1280x720 pixels). | video/lib/enums/Resolution.ts:18 |
HD_PORTRAIT
|
"720x1280" |
HD portrait resolution (720x1280 pixels). | video/lib/enums/Resolution.ts:23 |
SD_LANDSCAPE
|
"640x480" |
Standard definition landscape resolution (640x480 pixels). | video/lib/enums/Resolution.ts:28 |
SD_PORTRAIT
|
"480x640" |
Standard definition portrait resolution (480x640 pixels). | video/lib/enums/Resolution.ts:33 |
Defined in: video/lib/enums/StreamMode.ts:4
Enum representing different stream modes for live streaming broadcasts.
Enumeration Member | Value | Description | Defined in |
---|---|---|---|
AUTO
|
"auto" |
Streams are selected automatically based on session rules. | video/lib/enums/StreamMode.ts:8 |
MANUAL
|
"manual" |
Streams are manually selected for inclusion in the broadcast. | video/lib/enums/StreamMode.ts:13 |
Defined in: video/lib/video.ts:85
Video Client for managing and interacting with video-related operations in your application. This client allows you to control sessions, streams, archives, broadcasts, and various video-related features.
Usage:
- Create and manage video sessions with customizable settings.
- Control video streams, including muting, adding, and removing streams.
- Initiate SIP calls and establish WebSockets for real-time communication.
- Enable and disable captions for improved accessibility.
- Start, stop, and manage video archives and broadcasts.
- Render experiences and access detailed information about streams and archives.
- Generate client tokens for secure session connections.
- Perform various video-related operations with ease.
The Video Client is designed to simplify video management tasks within your application. It provides a comprehensive set of methods and options to configure and control video interactions seamlessly.
Create a standalone Video client
import { Video } from '@vonage/video';
const videoClient = new Video({
apiKey: VONAGE_API_KEY,
apiSecret: VONAGE_API_SECRET
});
Create an Video client from the Vonage client
import { Vonage } from '@vonage/server-client';
const vonage = new Vonage({
apiKey: VONAGE_API_KEY,
apiSecret: VONAGE_API_SECRET
});
const videoClient = vonage.video;
new Video(credentials, options?): Video;
Defined in: server-client/dist/lib/client.d.ts:35
Creates a new instance of the Client.
The authentication credentials or an authentication instance.
Optional configuration settings for the client.
protected auth: AuthInterface;
Defined in: server-client/dist/lib/client.d.ts:24
The authentication instance responsible for generating authentication headers and query parameters.
protected authType: AuthenticationType = AuthenticationType.JWT;
Defined in: video/lib/video.ts:86
The type of authentication used for the client's requests.
protected config: ConfigParams;
Defined in: server-client/dist/lib/client.d.ts:28
Configuration settings for the client, including default hosts for various services and other request settings.
static transformers: object;
Defined in: server-client/dist/lib/client.d.ts:11
Static property containing utility transformers.
camelCaseObjectKeys: PartialTransformFunction;
kebabCaseObjectKeys: PartialTransformFunction;
omit: (keys, obj) => TransformedObject;
string
[]
snakeCaseObjectKeys: PartialTransformFunction;
addArchiveStream(
archiveId,
streamId,
audio?,
video?): Promise<void>;
Defined in: video/lib/video.ts:103
Adds a stream to an existing archive, allowing you to include additional streams in the archive recording.
string
The ID of the archive to which you want to add a stream.
string
The ID of the stream you want to add to the archive.
boolean
= true
Whether to include audio from the added stream (default: true).
boolean
= true
Whether to include video from the added stream (default: true).
Promise
<void
>
A promise that resolves when the stream has been successfully added to the archive.
If an error occurs while adding the stream to the archive.
await videoClient.addArchiveStream(ARCHIVE_ID, STREAM_ID);
addAuthenticationToRequest(request): Promise<VetchOptions>;
Defined in: server-client/dist/lib/client.d.ts:43
Adds the appropriate authentication headers or parameters to the request based on the authentication type.
The request options to which authentication needs to be added.
Promise
<VetchOptions
>
- The request options with the added authentication.
Client
.addAuthenticationToRequest
protected addBasicAuthToRequest(request): Promise<VetchOptions>;
Defined in: server-client/dist/lib/client.d.ts:71
Adds basic authentication headers to the request.
The request options to which authentication needs to be added.
Promise
<VetchOptions
>
- The request options with the added authentication.
protected addJWTToRequest(request): Promise<VetchOptions>;
Defined in: server-client/dist/lib/client.d.ts:64
Adds a JWT to the request.
The request options to which authentication needs to be added.
Promise
<VetchOptions
>
- The request options with the added authentication.
protected addQueryKeySecretToRequest(request): Promise<VetchOptions>;
Defined in: server-client/dist/lib/client.d.ts:57
Adds API key and secret to the request.
The request options to which authentication needs to be added.
Promise
<VetchOptions
>
- The request options with the added authentication.
Client
.addQueryKeySecretToRequest
protected addQueryKeySecretToRequestBody(request): Promise<VetchOptions>;
Defined in: server-client/dist/lib/client.d.ts:50
Adds API key and secret to the request body.
The request options to which authentication needs to be added.
Promise
<VetchOptions
>
- The request options with the added authentication.
Client
.addQueryKeySecretToRequestBody
addStreamToBroadcast(broadcastId, streamId): Promise<void>;
Defined in: video/lib/video.ts:134
Adds a stream to an existing broadcast, allowing you to include additional streams in the live broadcast.
string
The ID of the broadcast to which you want to add a stream.
string
The ID of the stream you want to add to the broadcast.
Promise
<void
>
A promise that resolves when the stream has been successfully added to the broadcast.
If an error occurs while adding the stream to the broadcast.
await videoClient.addStreamToBroadcast(BROADCAST_ID, STREAM_ID);
connectToWebsocket(
sessionId,
clientToken,
config): Promise<WebSocketConnectResponse>;
Defined in: video/lib/video.ts:163
Connects to a WebSocket for a specified session using the provided client token and WebSocket configuration.
string
The ID of the session to which you want to connect via WebSocket.
string
The client token generated for authentication.
The WebSocket configuration specifying the URI and optional parameters.
Promise
<WebSocketConnectResponse
>
A promise that resolves with WebSocket connection details upon successful connection.
If an error occurs during the WebSocket connection process.
const result = await videoClient.connectToWebsocket(
SESSION_ID,
CLIENT_TOKEN,
{
uri: 'wss://example.com',
},
)
console.log(result.id);
createSession(sessionOptions?): Promise<Session>;
Defined in: video/lib/video.ts:229
Creates a new session with the specified options.
Optional session configuration options.
The archive mode for the session.
string
The location for the session.
The media mode for the session.
Promise
<Session
>
A promise that resolves with details of the newly created session.
If an error occurs during the session creation process.
Create a session with default options
const session = await videoClient.createSession({});
console.log(session.sessionId);
Create a session with archive mode set to manual
import { ArchiveMode } from '@vonage/video';
const session = await videoClient.createSession({
archiveMode: ArchiveMode.MANUAL,
});
console.log(session.sessionId);
Create a session with location set to a specific region
const session = await videoClient.createSession({
location: 'eu',
});
console.log(session.sessionId);
Create a session with media mode set to routed
import { MediaMode } from '@vonage/video';
const session = await videoClient.createSession({
mediaMode: MediaMode.ROUTED,
});
console.log(session.sessionId);
deleteArchive(archiveId): Promise<void>;
Defined in: video/lib/video.ts:265
Deletes an archive with the specified archive ID.
string
The ID of the archive to delete.
Promise
<void
>
A promise that resolves when the archive is successfully deleted.
If an error occurs while deleting the archive or if the archive with the given ID does not exist.
await videoClient.deleteArchive(ARCHIVE_ID);
disableCaptions(captionId): Promise<void>;
Defined in: video/lib/video.ts:283
Disables captions for a specific caption ID.
string
The ID of the caption to disable.
Promise
<void
>
A promise that resolves when the captions are successfully disabled.
If an error occurs while disabling captions or if the caption with the given ID does not exist.
await videoClient.disableCaptions(CAPTION_ID);
disableForceMute(sessionId, excludedStreamIds): Promise<ProjectDetailsResponse>;
Defined in: video/lib/video.ts:303
Disables force mute for a session, allowing audio for all streams.
string
The ID of the session for which to disable force mute.
string
[] = []
An optional array of stream IDs to exclude from the force mute operation.
Promise
<ProjectDetailsResponse
>
A promise that resolves when the force mute is successfully disabled for the session.
If an error occurs while disabling force mute or if the session with the given ID does not exist.
const forceMute = await videoClient.disableForceMute(SESSION_ID);
console.log(forceMute.status);
disconnectClient(sessionId, connectionId): Promise<void>;
Defined in: video/lib/video.ts:323
Disconnects a client from a session.
string
The ID of the session from which to disconnect the client.
string
The ID of the client's connection to disconnect.
Promise
<void
>
A promise that resolves when the client is successfully disconnected from the session.
If an error occurs while disconnecting the client or if the session or connection with the given IDs do not exist.
await videoClient.disconnectClient(SESSION_ID, CONNECTION_ID);
disconnectWebsocket(callId): Promise<void>;
Defined in: video/lib/video.ts:344
Disconnects a WebSocket connection associated with a call or session.
string
The ID of the call or session to which the WebSocket connection is associated.
Promise
<void
>
A promise that resolves when the WebSocket connection is successfully disconnected.
If an error occurs while disconnecting the WebSocket connection or if the call or session with the given ID does not exist.
await videoClient.disconnectWebsocket(CALL_ID);
enableCaptions(
sessionId,
clientToken,
captionOptions?): Promise<EnableCaptionResponse>;
Defined in: video/lib/video.ts:365
Enables captions for a session using the specified client token and caption options.
string
The ID of the session to enable captions for.
string
The client token associated with the session, used for authentication.
CaptionOptions
= {}
Optional caption options to configure caption behavior.
Promise
<EnableCaptionResponse
>
A promise that resolves with an EnableCaptionResponse
containing information about the enabled captions.
If an error occurs while enabling captions or if the session with the given ID does not exist.
const result = await videoClient.enableCaptions(SESSION_ID, CLIENT_TOKEN);
console.log(result.captionId);
forceMuteAll(sessionId, excludedStreamIds?): Promise<ProjectDetailsResponse>;
Defined in: video/lib/video.ts:396
Forces muting of all streams in a session, except those specified in the excludedStreamIds
array.
string
The ID of the session in which to force mute streams.
string
[] = []
An optional array of stream IDs to exclude from muting.
Promise
<ProjectDetailsResponse
>
A promise that resolves with a ProjectDetailsResponse
containing updated session details after muting.
If an error occurs while muting the streams or if the session with the given ID does not exist.
const forceMute = await videoClient.forceMuteAll(SESSION_ID);
console.log(forceMute.status);
generateClientToken(sessionId, tokenOptions?): string;
Defined in: video/lib/video.ts:416
Generates a client token for connecting to a session with the specified options.
string
The ID of the session to generate the client token for.
Optional token options including role, data, and expiration time.
string
A client token that can be used for authentication when connecting to a session.
const token = videoClient.generateClientToken(SESSION_ID);
console.log(`The token is ${token}`);
getArchive<T>(archiveId): Promise<T>;
Defined in: video/lib/video.ts:465
Retrieves information about a specific archive by its ID.
T
extends SingleArchiveResponseBase
= SingleArchiveResponse
string
The ID of the archive to retrieve.
Promise
<T
>
A promise that resolves to the details of the requested archive.
const archive = await videoClient.getArchive(ARCHIVE_ID);
console.log(archive.createdAt);
getBroadcast(broadcastId): Promise<BroadcastDetailsResponse>;
Defined in: video/lib/video.ts:485
Retrieves information about a specific broadcast by its ID.
string
The ID of the broadcast to retrieve.
Promise
<BroadcastDetailsResponse
>
A promise that resolves to the details of the requested broadcast.
const broadcast = await videoClient.getBroadcast(BROADCAST_ID);
console.log(broadcast.createdAt);
getCaptionStatus(captionId): Promise<CaptionStatusResponse>;
Defined in: video/lib/video.ts:506
Retrieves the status of a caption by its ID.
string
The ID of the caption to retrieve the status for.
Promise
<CaptionStatusResponse
>
A promise that resolves to the status of the requested caption.
const captionStatus = await videoClient.getCaptionStatus(CAPTION_ID);
console.log(captionStatus.status);
getConfig(): ConfigParams;
Defined in: server-client/dist/lib/client.d.ts:36
getExperienceComposerRender(renderId): Promise<ExperienceComposerResponse>;
Defined in: video/lib/video.ts:527
Retrieves the details of an Experience Composer render by its ID.
string
The ID of the Experience Composer render to retrieve.
Promise
<ExperienceComposerResponse
>
A promise that resolves to the details of the requested Experience Composer render.
const render = await videoClient.getExperienceComposerRender(RENDER_ID);
console.log(render.createdAt);
getStreamInfo(sessionId, streamId?): Promise<
| SingleStreamLayoutResponse
| MultiStreamLayoutResponse>;
Defined in: video/lib/video.ts:556
Retrieves information about one or more streams in a session.
string
The ID of the session to retrieve stream information from.
string
Optional. The ID of a specific stream to retrieve information for.
Promise
<
| SingleStreamLayoutResponse
| MultiStreamLayoutResponse
>
A promise that resolves to stream information. If a specific streamId
is provided, it resolves to a single stream's information (SingleStreamLayoutResponse), otherwise, it resolves to multiple streams' information (MultiStreamLayoutResponse).
const streamInfo = await videoClient.getStreamInfo(SESSION_ID);
if (streamInfo.items) {
streamInfo.items.forEach((item) => {
console.log(item.id);
});
} else {
console.log(streamInfo.id);
}
intiateSIPCall(sessionId, options): Promise<SIPCallResponse>;
Defined in: video/lib/video.ts:614
Initiates a SIP call within a session.
string
The ID of the session in which to initiate the SIP call.
The options for initiating the SIP call.
Promise
<SIPCallResponse
>
A promise that resolves to the SIP call response, including the call ID and other details.
Start a SIP call with default options
const sipCall = await videoClient.intiateSIPCall(SESSION_ID);
console.log(sipCall.id);
Start a SIP call with custom options
const sipCall = await videoClient.intiateSIPCall(
SESSION_ID,
{
uri: 'sip://example.com',
}
);
console.log(sipCall.id);
listExperienceComposerRenders(filter): Promise<MultiExperienceComposerResponse>;
Defined in: video/lib/video.ts:647
Lists Experience Composer renders based on the specified filter criteria.
An optional filter to apply when listing Experience Composer renders.
Promise
<MultiExperienceComposerResponse
>
A promise that resolves to a list of Experience Composer renders matching the filter criteria.
const renders = await videoClient.listExperienceComposerRenders();
for (const render of renders.items) {
console.log(render.id);
}
protected muteAllStreams(
sessionId,
active,
excludedStreamIds): Promise<ProjectDetailsResponse>;
Defined in: video/lib/video.ts:671
Mutes or unmutes all streams in a session, optionally excluding specific stream IDs from muting.
string
The ID of the session in which to mute or unmute streams.
boolean
true
to mute all streams, false
to unmute all streams.
string
[] = []
An optional array of stream IDs to exclude from muting/unmuting.
Promise
<ProjectDetailsResponse
>
A promise that resolves to the updated session details.
const forceMute = await videoClient.muteAll(SESSION_ID);
console.log(forceMute.status);
muteStream(sessionId, streamId): Promise<ProjectDetailsResponse>;
Defined in: video/lib/video.ts:699
Mutes or unmutes a specific stream in a session.
string
The ID of the session containing the stream.
string
The ID of the stream to mute or unmute.
Promise
<ProjectDetailsResponse
>
A promise that resolves to the updated session details.
const forceMute = await videoClient.muteStream(SESSION_ID, STREAM_ID);
console.log(forceMute.status);
protected parseResponse<T>(request, response): Promise<VetchResponse<T>>;
Defined in: server-client/dist/lib/client.d.ts:168
Parses the response based on its content type.
T
The expected type of the parsed response data.
The request options.
Response
The raw response from the request.
Promise
<VetchResponse
<T
>>
- The parsed response.
playDTMF(
sessionId,
digits,
connectionId?): Promise<void>;
Defined in: video/lib/video.ts:722
Sends DTMF (Dual-Tone Multi-Frequency) tones to a specific session or connection.
string
The ID of the session to send DTMF tones to.
string
The DTMF tones to play.
string
Optional. The ID of the connection within the session to send DTMF tones to.
Promise
<void
>
A promise that resolves when the DTMF tones have been played.
await videoClient.playDTMF(SESSION_ID, '1234');
protected prepareBody(request): undefined | string;
Defined in: server-client/dist/lib/client.d.ts:158
Prepares the body for the request based on the content type.
The request options.
undefined
| string
- The prepared request body as a string or undefined.
protected prepareRequest(request): Promise<VetchOptions>;
Defined in: server-client/dist/lib/client.d.ts:151
Prepares the request with necessary headers, authentication, and query parameters.
The initial request options.
Promise
<VetchOptions
>
- The modified request options.
removeArchiveStream(archiveId, streamId): Promise<void>;
Defined in: video/lib/video.ts:747
Removes a stream from an archive.
string
The ID of the archive from which to remove the stream.
string
The ID of the stream to remove from the archive.
Promise
<void
>
A promise that resolves when the stream has been successfully removed from the archive.
await videoClient.removeArchiveStream(ARCHIVE_ID, STREAM_ID);
removeStreamFromBroadcast(broadcastId, streamId): Promise<void>;
Defined in: video/lib/video.ts:769
Removes a stream from a broadcast.
string
The ID of the broadcast from which to remove the stream.
string
The ID of the stream to remove from the broadcast.
Promise
<void
>
A promise that resolves when the stream has been successfully removed from the broadcast.
await videoClient.removeStreamFromBroadcast(BROADCAST_ID, STREAM_ID);
searchArchives(filter?): Promise<MultiArchiveResponse>;
Defined in: video/lib/video.ts:801
Searches for archives based on the specified filter criteria.
Optional filter criteria to narrow down the search.
Promise
<MultiArchiveResponse
>
A promise that resolves with the search results, including multiple archive items.
const archives = await videoClient.searchArchives();
for (const archive of archives.items) {
console.log(archive.id);
}
Search for archives for a session
const archives = await videoClient.searchArchives({
sessionId: SESSION_ID,
});
for (const archive of archives.items) {
console.log(archive.id);
}
searchBroadcasts(filter?): Promise<MultiBroadcastResponse>;
Defined in: video/lib/video.ts:836
Searches for broadcasts based on the specified filter criteria.
Optional filter criteria to narrow down the search.
Promise
<MultiBroadcastResponse
>
A promise that resolves with the search results, including multiple broadcast items.
const broadcasts = await videoClient.searchBroadcasts();
for (const broadcast of broadcasts.items) {
console.log(broadcast.id);
}
Get braodcasts for a session
const broadcasts = await videoClient.searchBroadcasts({
sessionId: SESSION_ID,
})
for (const broadcast of broadcasts.items) {
console.log(broadcast.id);
}
sendDeleteRequest<T>(url): Promise<VetchResponse<T>>;
Defined in: server-client/dist/lib/client.d.ts:78
Sends a DELETE request to the specified URL.
T
string
The URL endpoint for the DELETE request.
Promise
<VetchResponse
<T
>>
- The response from the DELETE request.
sendFormSubmitRequest<T>(url, payload?): Promise<VetchResponse<T>>;
Defined in: server-client/dist/lib/client.d.ts:86
Sends a POST request with form data to the specified URL.
T
string
The URL endpoint for the POST request.
Record
<string
, undefined
| string
>
Optional payload containing form data to send with the POST request.
Promise
<VetchResponse
<T
>>
- The response from the POST request.
sendGetRequest<T>(url, queryParams?): Promise<VetchResponse<T>>;
Defined in: server-client/dist/lib/client.d.ts:94
Sends a GET request to the specified URL with optional query parameters.
T
string
The URL endpoint for the GET request.
Optional query parameters to append to the URL. These should be compatible with Node's URLSearchParams.
Promise
<VetchResponse
<T
>>
- The response from the GET request.
sendPatchRequest<T>(url, payload?): Promise<VetchResponse<T>>;
Defined in: server-client/dist/lib/client.d.ts:104
Sends a PATCH request to the specified URL with an optional payload.
T
string
The URL endpoint for the PATCH request.
Optional payload to be sent as the body of the PATCH request.
Promise
<VetchResponse
<T
>>
- The response from the PATCH request.
sendPostRequest<T>(url, payload?): Promise<VetchResponse<T>>;
Defined in: server-client/dist/lib/client.d.ts:114
Sends a POST request to the specified URL with an optional payload.
T
string
The URL endpoint for the POST request.
Optional payload to be sent as the body of the POST request.
Promise
<VetchResponse
<T
>>
- The response from the POST request.
sendPutRequest<T>(url, payload?): Promise<VetchResponse<T>>;
Defined in: server-client/dist/lib/client.d.ts:124
Sends a PUT request to the specified URL with an optional payload.
T
string
The URL endpoint for the PUT request.
Optional payload to be sent as the body of the PUT request.
Promise
<VetchResponse
<T
>>
- The response from the PUT request.
sendRequest<T>(request): Promise<VetchResponse<T>>;
Defined in: server-client/dist/lib/client.d.ts:144
Sends a request adding necessary headers, handling authentication, and parsing the response.
T
The options defining the request, including URL, method, headers, and data.
Promise
<VetchResponse
<T
>>
- The parsed response from the request.
sendRequestWithData<T>(
method,
url,
payload?): Promise<VetchResponse<T>>;
Defined in: server-client/dist/lib/client.d.ts:135
Sends a request with JSON-encoded data to the specified URL using the provided HTTP method.
T
The HTTP method to be used for the request (only POST, PATCH, or PUT are acceptable).
string
The URL endpoint for the request.
Optional payload to be sent as the body of the request, JSON-encoded.
Promise
<VetchResponse
<T
>>
- The response from the request.
sendSignal(
signal,
sessionId,
connectionId?): Promise<void>;
Defined in: video/lib/video.ts:864
Sends a signal to a session or a specific connection within a session.
The signal to send, including a type and data.
string
The ID of the session to which the signal will be sent.
string
Optional. The ID of the connection within the session to which the signal will be sent. If not provided, the signal will be sent to the entire session.
Promise
<void
>
A promise that resolves when the signal is successfully sent.
await videoClient.sendSignal(
{
type: 'text',
data: 'Hello world!',
},
SESSION_ID,
);
##### setStreamClassLists()
```ts
setStreamClassLists(sessionId, settings): Promise<void>;
Defined in: video/lib/video.ts:898
Sets the stream class lists for one or more streams within a session.
string
The ID of the session for which stream class lists will be set.
An array of objects specifying the stream ID and corresponding class lists to be set.
Promise
<void
>
A promise that resolves when the stream class lists are successfully set.
await videoClient.setStreamClassLists(
SESSION_ID,
[
{
id: STREAM_ID,
layoutClassList: ['full'],
}
]
)
startArchive<T>(sessionId, options?): Promise<T>;
Defined in: video/lib/video.ts:921
Starts an archive for a given session with optional configuration.
T
extends SingleArchiveResponseBase
= SingleArchiveResponse
string
The ID of the session to archive.
Optional configuration for the archive, such as audio/video settings, layout, and more.
Promise
<T
>
A promise that resolves with information about the started archive.
const archive = await videoClient.startArchive(SESSION_ID);
console.log(archive.id);
startBroadcast(sessionId, config): Promise<BroadcastDetailsResponse>;
Defined in: video/lib/video.ts:958
Starts a broadcast for a given session with the specified configuration.
string
The ID of the session to start broadcasting.
Configuration for the broadcast, including stream settings, layout, and more.
Promise
<BroadcastDetailsResponse
>
A promise that resolves with information about the started broadcast.
const broadcast = await videoClient.startBroadcast(
SESSION_ID,
{
outputs: {
hls: {
lowLatency: true,
}
rtmp: [{
serverUrl: 'rtmp://example.com',
}],
}
}
);
startExperienceComposerRender(
sessionId,
token,
config): Promise<ExperienceComposerResponse>;
Defined in: video/lib/video.ts:989
Starts rendering an experience composer with the provided configuration.
string
The ID of the session associated with the experience composer.
string
The client token for authentication.
Configuration options for the experience composer rendering.
Promise
<ExperienceComposerResponse
>
A promise that resolves with information about the started experience composer rendering.
const render = await videoClient.startExperienceComposerRender(
SESSION_ID,
token,
)
console.log(render.id);
stopArchive(archiveId): Promise<SingleArchiveResponse>;
Defined in: video/lib/video.ts:1015
Stops an archive with the given archive ID.
string
The ID of the archive to stop.
Promise
<SingleArchiveResponse
>
A promise that resolves with information about the stopped archive.
const archive = await videoClient.stopArchive(ARCHIVE_ID);
console.log(archive.status);
stopBroadcast(broadcastId): Promise<BroadcastDetailsResponse>;
Defined in: video/lib/video.ts:1034
Stops a broadcast with the given broadcast ID.
string
The ID of the broadcast to stop.
Promise
<BroadcastDetailsResponse
>
A promise that resolves with information about the stopped broadcast.
const broadcast = await videoClient.stopBroadcast(BROADCAST_ID);
console.log(broadcast.status);
stopExperienceComposerRender(renderId): Promise<void>;
Defined in: video/lib/video.ts:1054
Stops an Experience Composer render with the given render ID.
string
The ID of the Experience Composer render to stop.
Promise
<void
>
A promise that resolves when the render is successfully stopped.
await videoClient.stopExperienceComposerRender(RENDER_ID);
updateArchiveLayout(archiveId, layout): Promise<void>;
Defined in: video/lib/video.ts:1072
Updates the layout of an archive with the given archive ID.
string
The ID of the archive to update the layout for.
The new layout configuration to set for the archive.
Promise
<void
>
A promise that resolves when the layout is successfully updated.
await videoClient.updateArchiveLayout(
updateBroadcast(config): Promise<void>;
Defined in: video/lib/video.ts:1097
Updates the configuration of a broadcast with the given broadcast ID.
The configuration options to update the broadcast.
Promise
<void
>
A promise that resolves when the broadcast is successfully updated.
await videoClient.updateBroadcast({
broadcastId: BROADCAST_ID,
hasAudio: true,
})
type ArchiveLayout = object;
Defined in: video/lib/types/ArchiveLayout.ts:6
Represents the layout configuration for an archive.
optional screenshareType: string;
Defined in: video/lib/types/ArchiveLayout.ts:22
Optional: The screenshare layout type to use when there is a screen-sharing stream in the archive (only applicable if type is 'bestFit' and screenshareType is set).
optional stylesheet: string;
Defined in: video/lib/types/ArchiveLayout.ts:15
Optional: The stylesheet used for custom layout (only applicable if type is 'custom').
type: LayoutType;
Defined in: video/lib/types/ArchiveLayout.ts:10
The type of layout to be used for the archive.
type ArchiveOptions =
| ArchiveOptionsWithMaxBitrate
| ArchiveOptionsWithMaxBitrate & ArchiveWithTranscription
| ArchiveOptionsWithMaxBitrate & ArchiveWithoutTranscription
| ArchiveOptionsWithQuantizationParameter
| ArchiveOptionsWithQuantizationParameter & ArchiveWithTranscription
| ArchiveOptionsWithQuantizationParameter & ArchiveWithoutTranscription
| ArchiveWithTranscription
| ArchiveWithoutTranscription;
Defined in: video/lib/types/ArchiveOptions.ts:113
type ArchiveSearchFilter = object;
Defined in: video/lib/types/ArchiveSearchFilter.ts:4
Interface representing filters for searching archives.
optional count: number;
Defined in: video/lib/types/ArchiveSearchFilter.ts:13
The number of archives to retrieve starting at the offset. Default is 50, with a maximum of 1000.
optional offset: number;
Defined in: video/lib/types/ArchiveSearchFilter.ts:8
The start offset in the list of existing archives.
optional sessionId: string;
Defined in: video/lib/types/ArchiveSearchFilter.ts:18
Retrieve archives for a specific session ID.
type BroadcastConfig = object;
Defined in: video/lib/types/BroadcastConfig.ts:37
Interface representing configuration options for a live streaming broadcast.
optional hasAudio: boolean;
Defined in: video/lib/types/BroadcastConfig.ts:62
Whether the broadcast has audio.
optional hasVideo: boolean;
Defined in: video/lib/types/BroadcastConfig.ts:67
Whether the broadcast has video.
optional layout: LayoutType;
Defined in: video/lib/types/BroadcastConfig.ts:57
The layout type for the broadcast.
optional maxBitrate: number;
Defined in: video/lib/types/BroadcastConfig.ts:52
The maximum bitrate for the stream.
optional maxDuration: number;
Defined in: video/lib/types/BroadcastConfig.ts:47
The maximum duration for the broadcast, in seconds. The broadcast will automatically stop when the maximum duration is reached.
optional multiBroadcastTag: string;
Defined in: video/lib/types/BroadcastConfig.ts:41
The unique tag for simultaneous broadcasts (if one was set).
outputs: BroadcastOutputs;
Defined in: video/lib/types/BroadcastConfig.ts:72
Configuration options for different types of broadcast streams (HLS and RTMP).
optional resolution: Resolution;
Defined in: video/lib/types/BroadcastConfig.ts:82
The resolution of the broadcast.
optional streamMode: StreamMode;
Defined in: video/lib/types/BroadcastConfig.ts:77
The stream mode for the broadcast.
type BroadcastDetailsResponse = object;
Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:17
Represents the response containing details about a live streaming broadcast.
applicationId: string;
Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:36
The Vonage Application UUID.
broadcastUrls: object;
Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:61
An object containing details about the HLS and RTMP broadcasts.
optional hls: string;
The URL for the HLS broadcast.
rtmp: RTMPStream[];
An array of RTMP streams.
createdAt: number;
Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:41
The time the broadcast started, expressed in milliseconds since the Unix epoch (January 1, 1970, 00:00:00 UTC).
hasAudio: boolean;
Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:96
Indicates whether the broadcast has audio.
hasVideo: boolean;
Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:91
Indicates whether the broadcast has video.
id: string;
Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:21
The unique ID for the broadcast.
optional maxBitrate: number;
Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:56
The maximum bitrate for the stream.
optional maxDuration: number;
Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:51
The maximum duration for the broadcast (if one was set), in seconds.
optional multiBroadcasTag: string;
Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:31
The unique tag for simultaneous broadcasts (if one was set).
optional resolution: Resolution;
Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:86
The resolution of the broadcast, if set.
sessionId: string;
Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:26
The Vonage Video session ID associated with the broadcast.
optional settings: object;
Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:76
An object containing settings for HLS.
optional hls: HlsSettings;
HLS settings.
streamMode: StreamMode;
Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:101
The stream mode for the broadcast.
updatedAt: number;
Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:46
The timestamp when the broadcast was last updated, expressed in milliseconds since the Unix epoch.
type BroadcastOutputs = object;
Defined in: video/lib/types/BroadcastConfig.ts:22
Interface representing configuration options for different types of broadcast streams (HLS and RTMP).
optional hls: HLSConfig;
Defined in: video/lib/types/BroadcastConfig.ts:26
Configuration options for HLS streaming.
rtmp: RTMPStream[];
Defined in: video/lib/types/BroadcastConfig.ts:31
Configuration options for RTMP streaming.
type BroadcastSearchFilter = object;
Defined in: video/lib/types/BroadcastSearchFilter.ts:4
Interface representing a filter for searching broadcasts.
optional count: number;
Defined in: video/lib/types/BroadcastSearchFilter.ts:13
The maximum number of items to return.
optional offset: number;
Defined in: video/lib/types/BroadcastSearchFilter.ts:8
The offset for paginating the results.
optional sessionId: string;
Defined in: video/lib/types/BroadcastSearchFilter.ts:18
The session ID to filter broadcasts by.
type BroadcastUpdateConfig = object;
Defined in: video/lib/types/BroadcastUpdateConfig.ts:4
Interface representing the configuration for updating a broadcast.
optional addStream: string;
Defined in: video/lib/types/BroadcastUpdateConfig.ts:23
The ID of a stream to add to the broadcast.
broadcastId: string;
Defined in: video/lib/types/BroadcastUpdateConfig.ts:8
The ID of the broadcast to update.
optional hasAudio: boolean;
Defined in: video/lib/types/BroadcastUpdateConfig.ts:13
Whether to include audio in the broadcast.
optional hasVideo: boolean;
Defined in: video/lib/types/BroadcastUpdateConfig.ts:18
Whether to include video in the broadcast.
optional removeStream: string;
Defined in: video/lib/types/BroadcastUpdateConfig.ts:28
The ID of a stream to remove from the broadcast.
type CaptionOptions = object;
Defined in: video/lib/types/CaptionOptions.ts:4
Interface representing options for captions.
optional languageCode: "en-us";
Defined in: video/lib/types/CaptionOptions.ts:8
The language code for captions (e.g., "en-us").
optional maxDuration: number;
Defined in: video/lib/types/CaptionOptions.ts:13
The maximum duration for captions.
optional partialCaptions: "true" | "false";
Defined in: video/lib/types/CaptionOptions.ts:18
Whether to generate partial captions.
optional statusCallbackUrl: string;
Defined in: video/lib/types/CaptionOptions.ts:23
The URL for the status callback of captions.
type CaptionStatusResponse = object;
Defined in: video/lib/types/Response/CaptionStatusResponse.ts:6
Represents a response containing the status of captions for a live streaming broadcast.
applicationId: string;
Defined in: video/lib/types/Response/CaptionStatusResponse.ts:15
The Vonage Application UUID.
captionId: string;
Defined in: video/lib/types/Response/CaptionStatusResponse.ts:10
The unique ID for the caption.
createdAt: number;
Defined in: video/lib/types/Response/CaptionStatusResponse.ts:31
The time when the caption was created, expressed in milliseconds since the Unix epoch (January 1, 1970, 00:00:00 UTC).
duration: number;
Defined in: video/lib/types/Response/CaptionStatusResponse.ts:41
The duration of the caption, in seconds.
languageCode: "en-us";
Defined in: video/lib/types/Response/CaptionStatusResponse.ts:46
The language code of the captions (e.g., "en-us" for English, US).
provider: "aws-transcribe";
Defined in: video/lib/types/Response/CaptionStatusResponse.ts:51
The caption provider (e.g., "aws-transcribe").
optional reason: string;
Defined in: video/lib/types/Response/CaptionStatusResponse.ts:56
An optional reason for the caption status.
sessionId: string;
Defined in: video/lib/types/Response/CaptionStatusResponse.ts:20
The Vonage Video session ID associated with the broadcast.
status: CaptionStatus;
Defined in: video/lib/types/Response/CaptionStatusResponse.ts:25
The status of the captions.
updatedAt: number;
Defined in: video/lib/types/Response/CaptionStatusResponse.ts:36
The timestamp when the caption was last updated, expressed in milliseconds since the Unix epoch.
type ClientTokenClaims = object;
Defined in: video/lib/types/ClientTokenClaims.ts:4
Interface representing claims for a client token.
acl: object;
Defined in: video/lib/types/ClientTokenClaims.ts:48
Access control list (ACL) for paths.
paths: object;
Paths and associated objects in the ACL.
[key: string]: object
optional connection_data: string;
Defined in: video/lib/types/ClientTokenClaims.ts:38
Connection data associated with the token (optional).
optional data: string;
Defined in: video/lib/types/ClientTokenClaims.ts:28
Additional data for the token (optional).
optional exp: number;
Defined in: video/lib/types/ClientTokenClaims.ts:33
The expiration time of the token (optional).
initial_layout_class_list: string;
Defined in: video/lib/types/ClientTokenClaims.ts:23
The initial layout class list.
role: string;
Defined in: video/lib/types/ClientTokenClaims.ts:18
The role of the token.
scope: string;
Defined in: video/lib/types/ClientTokenClaims.ts:8
The scope of the token.
session_id: string;
Defined in: video/lib/types/ClientTokenClaims.ts:13
The session ID associated with the token.
sub: string;
Defined in: video/lib/types/ClientTokenClaims.ts:43
The subject of the token.
type ClientTokenOptions = object;
Defined in: video/lib/types/ClientTokenOptions.ts:4
Interface representing options for generating a client token.
optional data: string;
Defined in: video/lib/types/ClientTokenOptions.ts:13
Additional data for the client token (optional).
optional expireTime: number;
Defined in: video/lib/types/ClientTokenOptions.ts:18
The expiration time of the client token in seconds (optional).
optional initialLayoutClassList: string[];
Defined in: video/lib/types/ClientTokenOptions.ts:23
An array of initial layout class list for the client token (optional).
optional role: string;
Defined in: video/lib/types/ClientTokenOptions.ts:8
The role associated with the client token (optional).
type CreateSessionResponse = object;
Defined in: video/lib/types/Response/CreateSessionResponse.ts:4
Represents a response containing the details of a created session.
create_dt: string;
Defined in: video/lib/types/Response/CreateSessionResponse.ts:18
The creation date and time of the session in string format.
media_server_url: string;
Defined in: video/lib/types/Response/CreateSessionResponse.ts:23
The URL of the media server associated with the session.
project_id: string;
Defined in: video/lib/types/Response/CreateSessionResponse.ts:13
The project ID associated with the session.
session_id: string;
Defined in: video/lib/types/Response/CreateSessionResponse.ts:8
The unique session ID.
type EnableCaptionResponse = object;
Defined in: video/lib/types/Response/EnableCaptionResponse.ts:4
Represents a response indicating the ID of the enabled caption.
captionsId: string;
Defined in: video/lib/types/Response/EnableCaptionResponse.ts:8
The unique ID of the enabled caption.
type ExperienceComposerListFilter = object;
Defined in: video/lib/types/ExperienceComposerListFilter.ts:4
Interface representing filters for listing Experience Composer items.
optional count: number;
Defined in: video/lib/types/ExperienceComposerListFilter.ts:13
The maximum number of items to retrieve (optional).
optional offset: number;
Defined in: video/lib/types/ExperienceComposerListFilter.ts:8
The offset for paginating through the list (optional).
type ExperienceComposerOptions = object;
Defined in: video/lib/types/ExperienceComposerOptions.ts:6
Interface representing options for creating an Experience Composer.
optional maxDuration: number;
Defined in: video/lib/types/ExperienceComposerOptions.ts:25
The maximum duration for the Experience Composer (optional).
optional properties: object;
Defined in: video/lib/types/ExperienceComposerOptions.ts:15
Optional properties for the Experience Composer.
optional name: string;
The name of the Experience Composer.
optional resolution: ExperienceComposerResolution;
Defined in: video/lib/types/ExperienceComposerOptions.ts:30
The resolution of the Experience Composer (optional).
optional statusCallbackUrl: string;
Defined in: video/lib/types/ExperienceComposerOptions.ts:35
The callback URL for status updates (optional).
url: string;
Defined in: video/lib/types/ExperienceComposerOptions.ts:10
The URL of the Experience Composer.
type ExperienceComposerResponse = object;
Defined in: video/lib/types/Response/ExperienceComposerResponse.ts:6
Represents a response from the Experience Composer.
applicationId: string;
Defined in: video/lib/types/Response/ExperienceComposerResponse.ts:20
The application ID associated with the response.
createdAt: number;
Defined in: video/lib/types/Response/ExperienceComposerResponse.ts:25
The timestamp when the response was created (milliseconds since the Unix epoch).
id: string;
Defined in: video/lib/types/Response/ExperienceComposerResponse.ts:10
The unique ID of the response.
optional reason: string;
Defined in: video/lib/types/Response/ExperienceComposerResponse.ts:55
An optional reason for the status, if available.
resolution: ExperienceComposerResolution;
Defined in: video/lib/types/Response/ExperienceComposerResponse.ts:40
The resolution used by the Experience Composer.
sessionId: string;
Defined in: video/lib/types/Response/ExperienceComposerResponse.ts:15
The session ID associated with the response.
status: "starting" | "started" | "stopped" | "failed";
Defined in: video/lib/types/Response/ExperienceComposerResponse.ts:45
The status of the response, which can be one of: "starting", "started", "stopped", "failed".
streamId: string;
Defined in: video/lib/types/Response/ExperienceComposerResponse.ts:50
The stream ID associated with the response.
updatedAt: number;
Defined in: video/lib/types/Response/ExperienceComposerResponse.ts:30
The timestamp when the response was last updated (milliseconds since the Unix epoch).
url: string;
Defined in: video/lib/types/Response/ExperienceComposerResponse.ts:35
The URL associated with the response.
type HLSConfig = object;
Defined in: video/lib/types/BroadcastConfig.ts:7
Interface representing configuration options for HLS streaming.
optional dvr: boolean;
Defined in: video/lib/types/BroadcastConfig.ts:16
Whether to enable DVR functionality (rewinding, pausing, and resuming) in players that support it.
optional lowLatency: boolean;
Defined in: video/lib/types/BroadcastConfig.ts:11
Whether to enable low-latency mode for the HLS stream.
type HlsSettings = object;
Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:7
Represents HLS settings for a live streaming broadcast.
optional lowLatency: boolean;
Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:11
Whether to enable low-latency mode for the HLS stream.
type InitiateSIPCallRequest = SIPCallOptions & object;
Defined in: video/lib/types/Request/InitiateSIPCallRequest.ts:6
Represents the request to initiate a SIP call with additional session information.
sessionId: string;
The session ID of the Vonage Video session to associate with the SIP call.
type MultiArchiveResponse = object;
Defined in: video/lib/types/Response/MultiArchiveResponse.ts:6
Represents a response containing multiple archive items.
count: number;
Defined in: video/lib/types/Response/MultiArchiveResponse.ts:10
The count of archive items in the response.
items: SingleArchiveResponse[];
Defined in: video/lib/types/Response/MultiArchiveResponse.ts:15
An array of SingleArchiveResponse objects representing individual archive items.
type MultiBroadcastResponse = object;
Defined in: video/lib/types/Response/MultiBroadcastResponse.ts:6
Represents a response containing multiple broadcast details items.
count: number;
Defined in: video/lib/types/Response/MultiBroadcastResponse.ts:10
The count of broadcast details items in the response.
items: BroadcastDetailsResponse[];
Defined in: video/lib/types/Response/MultiBroadcastResponse.ts:15
An array of BroadcastDetailsResponse objects representing individual broadcast details items.
type MultiExperienceComposerResponse = object;
Defined in: video/lib/types/Response/MultiExperienceComposerResponse.ts:6
Represents a response containing multiple ExperienceComposerResponse items.
count: number;
Defined in: video/lib/types/Response/MultiExperienceComposerResponse.ts:10
The count of ExperienceComposerResponse items in the response.
items: ExperienceComposerResponse[];
Defined in: video/lib/types/Response/MultiExperienceComposerResponse.ts:15
An array of ExperienceComposerResponse objects representing individual items.
type MultiStreamLayoutResponse = object;
Defined in: video/lib/types/Response/MultiStreamLayoutResponse.ts:6
Represents a response containing multiple SingleStreamLayoutResponse items.
count: number;
Defined in: video/lib/types/Response/MultiStreamLayoutResponse.ts:10
The count of SingleStreamLayoutResponse items in the response.
items: SingleStreamLayoutResponse[];
Defined in: video/lib/types/Response/MultiStreamLayoutResponse.ts:15
An array of SingleStreamLayoutResponse objects representing individual items.
type ProjectDetailsResponse = object;
Defined in: video/lib/types/Response/ProjectDetailsResponse.ts:4
Represents the details of a project.
createdAt: number;
Defined in: video/lib/types/Response/ProjectDetailsResponse.ts:33
The timestamp when the project was created, expressed in milliseconds since the Unix epoch.
environment: string;
Defined in: video/lib/types/Response/ProjectDetailsResponse.ts:28
The environment of the project.
id: string;
Defined in: video/lib/types/Response/ProjectDetailsResponse.ts:8
The unique identifier of the project.
name: string;
Defined in: video/lib/types/Response/ProjectDetailsResponse.ts:23
The name of the project.
secret: string;
Defined in: video/lib/types/Response/ProjectDetailsResponse.ts:13
The secret associated with the project.
status: string;
Defined in: video/lib/types/Response/ProjectDetailsResponse.ts:18
The status of the project.
type RTMPStream = object;
Defined in: video/lib/types/RTMPStream.ts:4
Interface representing an RTMP stream configuration.
optional id: string;
Defined in: video/lib/types/RTMPStream.ts:8
Optional unique identifier for the RTMP stream.
serverUrl: string;
Defined in: video/lib/types/RTMPStream.ts:13
The RTMP server URL to which the stream will be sent.
streamName: string;
Defined in: video/lib/types/RTMPStream.ts:18
The name of the stream on the RTMP server.
type Session = object;
Defined in: video/lib/types/Session.ts:4
Interface representing a session configuration.
archiveMode: string;
Defined in: video/lib/types/Session.ts:23
The archive mode for the session (e.g., "MANUAL" or "ALWAYS").
location: string;
Defined in: video/lib/types/Session.ts:13
The location of the session.
mediaMode: string;
Defined in: video/lib/types/Session.ts:18
The media mode for the session (e.g., "ROUTED" or "RELAYED").
sessionId: string;
Defined in: video/lib/types/Session.ts:8
The unique identifier for the session.
type Signal = object;
Defined in: video/lib/types/Singal.ts:4
Represents a signal containing type and data properties.
data: string;
Defined in: video/lib/types/Singal.ts:13
The data associated with the signal, which can be any string data related to the signal.
type: string;
Defined in: video/lib/types/Singal.ts:8
The type of the signal, which can be a custom string identifying the signal type.
type SingleArchiveResponse =
| SingleArchiveResponseWithMaxBitrate & SingleArchiveResponseWithoutTranscription
| SingleArchiveResponseWithMaxBitrate & SingleArchiveResponseWithTranscription
| SingleArchiveResponseWithQuantizationParameter & SingleArchiveResponseWithoutTranscription
| SingleArchiveResponseWithQuantizationParameter & SingleArchiveResponseWithTranscription
| SingleArchiveResponseWithTranscription;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:145
Represents the details of a single archive, supporting mutually exclusive parameters.
type SingleArchiveResponseBase = object;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:4
Represents the details of a single archive.
createdAt: number;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:8
The timestamp when the archive was created, expressed in milliseconds since the Unix epoch.
duration: number;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:13
The duration of the archive in seconds.
hasAudio: boolean;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:18
Indicates whether the archive has audio.
hasVideo: boolean;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:23
Indicates whether the archive has video.
id: string;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:28
The unique identifier of the archive.
name: string;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:33
The name of the archive.
outputMode: string;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:38
The output mode of the archive.
projectId: string;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:43
The unique identifier of the project to which the archive belongs.
reason: string;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:48
The reason for the archive status.
resolution: string;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:53
The resolution of the archive.
sessionId: string;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:58
The unique identifier of the session associated with the archive.
size: number;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:63
The size of the archive in bytes.
status: string;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:68
The status of the archive.
streamMode: string;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:73
The stream mode of the archive.
optional streams: string[];
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:83
An array of stream identifiers associated with the archive.
optional url: string;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:78
The URL of the archive.
type SingleArchiveResponseWithMaxBitrate = SingleArchiveResponseBase & object & Omit<SingleArchiveResponseBase, "quantizationParameter">;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:125
Represents an archive with a maximum bitrate.
maxBitrate: number;
The maximum video bitrate for the archive, in bits per second.
type SingleArchiveResponseWithoutTranscription = SingleArchiveResponseBase & object & Omit<SingleArchiveResponseBase, "transcriptionProperties">;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:115
Represents an archive without transcription properties.
optional hasTranscription: false;
Transcription is disabled on the archive
type SingleArchiveResponseWithQuantizationParameter = SingleArchiveResponseBase & object & Omit<SingleArchiveResponseBase, "maxBitrate">;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:135
Represents an archive with a quantization parameter.
quantizationParameter: number;
The quantization level for the archive quality.
type SingleArchiveResponseWithTranscription = SingleArchiveResponseBase & object;
Defined in: video/lib/types/Response/SingleArchiveResponse.ts:89
Represents an archive with transcription properties.
hasTranscription: true;
Post-processing will include transcription
transcriptionProperties: object;
Additional options when transcription is enabled
optional transcriptionProperties.hasSummary: boolean;
True if the transcription should have a summary.
optional transcriptionProperties.primaryLanguageCode: string;
The primary language spoken in the archive to be transcribed, in BCP-47 format. Example: en-US, es-ES, or pt-BR.
type SingleStreamLayoutResponse = object;
Defined in: video/lib/types/Response/SingleStreamLayoutResponse.ts:4
Represents the details of a single stream layout.
id: string;
Defined in: video/lib/types/Response/SingleStreamLayoutResponse.ts:8
The unique identifier of the stream layout.
layoutClassList: string[];
Defined in: video/lib/types/Response/SingleStreamLayoutResponse.ts:23
An array of CSS class names associated with the layout.
name: string;
Defined in: video/lib/types/Response/SingleStreamLayoutResponse.ts:18
The name of the stream layout.
videoType: string;
Defined in: video/lib/types/Response/SingleStreamLayoutResponse.ts:13
The type of video associated with the stream layout.
type SIPCallOptions = object;
Defined in: video/lib/types/SIPCallOptions.ts:56
Interface representing options for initiating a SIP call.
sip: SIPCallSIPConfig;
Defined in: video/lib/types/SIPCallOptions.ts:65
Configuration options for the SIP call.
token: string;
Defined in: video/lib/types/SIPCallOptions.ts:60
The authentication token for the SIP call.
type SIPCallResponse = object;
Defined in: video/lib/types/Response/SIPCallResponse.ts:4
Represents the response for a SIP call initiation.
connectionId: string;
Defined in: video/lib/types/Response/SIPCallResponse.ts:13
The connection identifier associated with the SIP call.
id: string;
Defined in: video/lib/types/Response/SIPCallResponse.ts:8
The unique identifier of the SIP call.
streamId: string;
Defined in: video/lib/types/Response/SIPCallResponse.ts:18
The stream identifier associated with the SIP call.
type SIPCallSIPConfig = object;
Defined in: video/lib/types/SIPCallOptions.ts:4
Configuration options for a SIP call.
optional auth: object;
Defined in: video/lib/types/SIPCallOptions.ts:25
Authentication credentials for the SIP call.
password: string;
The password for SIP authentication.
username: string;
The username for SIP authentication.
optional from: string;
Defined in: video/lib/types/SIPCallOptions.ts:13
The optional "from" field for the SIP call.
optional headers: object;
Defined in: video/lib/types/SIPCallOptions.ts:18
Custom headers to be included in the SIP call.
[key: string]: string
optional observeForceMute: boolean;
Defined in: video/lib/types/SIPCallOptions.ts:50
Indicates whether to observe and force mute for the SIP call.
optional secure: boolean;
Defined in: video/lib/types/SIPCallOptions.ts:40
Indicates whether the SIP call should be secure.
uri: string;
Defined in: video/lib/types/SIPCallOptions.ts:8
The SIP URI to initiate the call.
optional video: boolean;
Defined in: video/lib/types/SIPCallOptions.ts:45
Indicates whether video is enabled for the SIP call.
type StreamClassList = object;
Defined in: video/lib/types/StreamClassList.ts:4
Represents a stream with associated layout class list.
id: string;
Defined in: video/lib/types/StreamClassList.ts:8
The ID of the stream.
layoutClassList: string[];
Defined in: video/lib/types/StreamClassList.ts:13
An array of layout class names associated with the stream.
type VideoClassParameters = AuthParams & VetchOptions & object;
Defined in: video/lib/parameters/VideoClassParameters.ts:8
Parameters required to initialize the Video class.
applicationId: string;
The unique identifier for the application.
optional auth: AuthInterface;
Optional authentication interface to use for custom authentication.
privateKey: string;
The private key used for authentication.
type VideoResponse<T> = VetchResponse<T>;
Defined in: video/lib/types/VideoResponse.ts:6
Represents a video response that wraps a Vetch response.
T
type WebSocketConfig = object;
Defined in: video/lib/types/WebSocketConfig.ts:6
Configuration options for establishing a WebSocket connection.
optional audioRate: AudioRate;
Defined in: video/lib/types/WebSocketConfig.ts:27
The audio rate to be used for the WebSocket connection.
optional headers: object;
Defined in: video/lib/types/WebSocketConfig.ts:20
Optional headers to include in the WebSocket request.
[key: string]: string
optional streams: string[];
Defined in: video/lib/types/WebSocketConfig.ts:15
An array of stream IDs to associate with the WebSocket connection.
uri: string;
Defined in: video/lib/types/WebSocketConfig.ts:10
The URI to connect to the WebSocket server.
type WebSocketConnectResponse = object;
Defined in: video/lib/types/Response/WebSocketConnectResponse.ts:4
Represents the response for a WebSocket connection.
connectionId: string;
Defined in: video/lib/types/Response/WebSocketConnectResponse.ts:13
The connection identifier associated with the WebSocket connection.
id: string;
Defined in: video/lib/types/Response/WebSocketConnectResponse.ts:8
The unique identifier of the WebSocket connection.