Skip to content

Vonage Video

github-actions edited this page Jan 15, 2025 · 80 revisions

Vonage Video


Documentation / Vonage Video

Vonage Video

Enumerations

ArchiveMode

Defined in: video/lib/types/ArchiveMode.ts:4

Enum representing different archive modes.

Enumeration Members

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

ArchiveOutputMode

Defined in: video/lib/enums/ArchiveOutputMode.ts:4

Enum representing different output modes for video archives.

Enumeration Members

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

AudioRate

Defined in: video/lib/enums/AudioRate.ts:4

Enum representing different audio sample rates.

Enumeration Members

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

CaptionStatus

Defined in: video/lib/enums/CaptionStatus.ts:4

Enum representing different captioning status.

Enumeration Members

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

ExperienceComposerResolution

Defined in: video/lib/enums/ExperienceComposerResolution.ts:6

Enum representing different resolutions for an experience composer.

Enumeration Members

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

LayoutType

Defined in: video/lib/enums/LayoutType.ts:4

Enum representing different layout types for live streaming broadcasts.

Enumeration Members

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

MediaMode

Defined in: video/lib/enums/MediaMode.ts:4

Enum representing media modes for a session.

Enumeration Members

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

Resolution

Defined in: video/lib/enums/Resolution.ts:4

Enum representing different video resolutions for live streaming broadcasts.

Enumeration Members

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

StreamMode

Defined in: video/lib/enums/StreamMode.ts:4

Enum representing different stream modes for live streaming broadcasts.

Enumeration Members

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

Classes

Video

Defined in: video/lib/video.ts:84

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.

Remarks

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.

Examples

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;

Extends

Constructors

new Video()
new Video(credentials, options?): Video

Defined in: server-client/dist/lib/client.d.ts:35

Creates a new instance of the Client.

Parameters
credentials

The authentication credentials or an authentication instance.

AuthParams | AuthInterface

options?

ConfigParams

Optional configuration settings for the client.

Returns

Video

Inherited from

Client.constructor

Properties

auth
protected auth: AuthInterface;

Defined in: server-client/dist/lib/client.d.ts:24

The authentication instance responsible for generating authentication headers and query parameters.

Inherited from

Client.auth

authType
protected authType: AuthenticationType = AuthenticationType.JWT;

Defined in: video/lib/video.ts:85

The type of authentication used for the client's requests.

Overrides

Client.authType

config
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.

Inherited from

Client.config

transformers
static transformers: object;

Defined in: server-client/dist/lib/client.d.ts:11

Static property containing utility transformers.

camelCaseObjectKeys
camelCaseObjectKeys: PartialTransformFunction;
kebabCaseObjectKeys
kebabCaseObjectKeys: PartialTransformFunction;
omit()
omit: (keys, obj) => TransformedObject;
Parameters
keys

string[]

obj

ObjectToTransform

Returns

TransformedObject

snakeCaseObjectKeys
snakeCaseObjectKeys: PartialTransformFunction;
Inherited from

Client.transformers

Methods

addArchiveStream()
addArchiveStream(
   archiveId, 
   streamId, 
   audio?, 
video?): Promise<void>

Defined in: video/lib/video.ts:102

Adds a stream to an existing archive, allowing you to include additional streams in the archive recording.

Parameters
archiveId

string

The ID of the archive to which you want to add a stream.

streamId

string

The ID of the stream you want to add to the archive.

audio?

boolean = true

Whether to include audio from the added stream (default: true).

video?

boolean = true

Whether to include video from the added stream (default: true).

Returns

Promise<void>

A promise that resolves when the stream has been successfully added to the archive.

Throws

If an error occurs while adding the stream to the archive.

Example
await videoClient.addArchiveStream(ARCHIVE_ID, STREAM_ID);
addAuthenticationToRequest()
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.

Parameters
request

VetchOptions

The request options to which authentication needs to be added.

Returns

Promise<VetchOptions>

  • The request options with the added authentication.
Inherited from

Client.addAuthenticationToRequest

addBasicAuthToRequest()
protected addBasicAuthToRequest(request): Promise<VetchOptions>

Defined in: server-client/dist/lib/client.d.ts:71

Adds basic authentication headers to the request.

Parameters
request

VetchOptions

The request options to which authentication needs to be added.

Returns

Promise<VetchOptions>

  • The request options with the added authentication.
Inherited from

Client.addBasicAuthToRequest

addJWTToRequest()
protected addJWTToRequest(request): Promise<VetchOptions>

Defined in: server-client/dist/lib/client.d.ts:64

Adds a JWT to the request.

Parameters
request

VetchOptions

The request options to which authentication needs to be added.

Returns

Promise<VetchOptions>

  • The request options with the added authentication.
Inherited from

Client.addJWTToRequest

addQueryKeySecretToRequest()
protected addQueryKeySecretToRequest(request): Promise<VetchOptions>

Defined in: server-client/dist/lib/client.d.ts:57

Adds API key and secret to the request.

Parameters
request

VetchOptions

The request options to which authentication needs to be added.

Returns

Promise<VetchOptions>

  • The request options with the added authentication.
Inherited from

Client.addQueryKeySecretToRequest

addQueryKeySecretToRequestBody()
protected addQueryKeySecretToRequestBody(request): Promise<VetchOptions>

Defined in: server-client/dist/lib/client.d.ts:50

Adds API key and secret to the request body.

Parameters
request

VetchOptions

The request options to which authentication needs to be added.

Returns

Promise<VetchOptions>

  • The request options with the added authentication.
Inherited from

Client.addQueryKeySecretToRequestBody

addStreamToBroadcast()
addStreamToBroadcast(broadcastId, streamId): Promise<void>

Defined in: video/lib/video.ts:133

Adds a stream to an existing broadcast, allowing you to include additional streams in the live broadcast.

Parameters
broadcastId

string

The ID of the broadcast to which you want to add a stream.

streamId

string

The ID of the stream you want to add to the broadcast.

Returns

Promise<void>

A promise that resolves when the stream has been successfully added to the broadcast.

Throws

If an error occurs while adding the stream to the broadcast.

Example
await videoClient.addStreamToBroadcast(BROADCAST_ID, STREAM_ID);
connectToWebsocket()
connectToWebsocket(
   sessionId, 
   clientToken, 
config): Promise<WebSocketConnectResponse>

Defined in: video/lib/video.ts:162

Connects to a WebSocket for a specified session using the provided client token and WebSocket configuration.

Parameters
sessionId

string

The ID of the session to which you want to connect via WebSocket.

clientToken

string

The client token generated for authentication.

config

WebSocketConfig

The WebSocket configuration specifying the URI and optional parameters.

Returns

Promise<WebSocketConnectResponse>

A promise that resolves with WebSocket connection details upon successful connection.

Throws

If an error occurs during the WebSocket connection process.

Example
const result = await videoClient.connectToWebsocket(
  SESSION_ID,
  CLIENT_TOKEN,
  {
    uri: 'wss://example.com',
  },
)

console.log(result.id);
createSession()
createSession(sessionOptions?): Promise<Session>

Defined in: video/lib/video.ts:228

Creates a new session with the specified options.

Parameters
sessionOptions?

Optional session configuration options.

archiveMode

ArchiveMode

The archive mode for the session.

location

string

The location for the session.

mediaMode

MediaMode

The media mode for the session.

Returns

Promise<Session>

A promise that resolves with details of the newly created session.

Throws

If an error occurs during the session creation process.

Examples

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()
deleteArchive(archiveId): Promise<void>

Defined in: video/lib/video.ts:264

Deletes an archive with the specified archive ID.

Parameters
archiveId

string

The ID of the archive to delete.

Returns

Promise<void>

A promise that resolves when the archive is successfully deleted.

Throws

If an error occurs while deleting the archive or if the archive with the given ID does not exist.

Example
await videoClient.deleteArchive(ARCHIVE_ID);
disableCaptions()
disableCaptions(captionId): Promise<void>

Defined in: video/lib/video.ts:282

Disables captions for a specific caption ID.

Parameters
captionId

string

The ID of the caption to disable.

Returns

Promise<void>

A promise that resolves when the captions are successfully disabled.

Throws

If an error occurs while disabling captions or if the caption with the given ID does not exist.

Example
await videoClient.disableCaptions(CAPTION_ID);
disableForceMute()
disableForceMute(sessionId, excludedStreamIds): Promise<ProjectDetailsResponse>

Defined in: video/lib/video.ts:302

Disables force mute for a session, allowing audio for all streams.

Parameters
sessionId

string

The ID of the session for which to disable force mute.

excludedStreamIds

string[] = []

An optional array of stream IDs to exclude from the force mute operation.

Returns

Promise<ProjectDetailsResponse>

A promise that resolves when the force mute is successfully disabled for the session.

Throws

If an error occurs while disabling force mute or if the session with the given ID does not exist.

Example
const forceMute = await videoClient.disableForceMute(SESSION_ID);
console.log(forceMute.status);
disconnectClient()
disconnectClient(sessionId, connectionId): Promise<void>

Defined in: video/lib/video.ts:322

Disconnects a client from a session.

Parameters
sessionId

string

The ID of the session from which to disconnect the client.

connectionId

string

The ID of the client's connection to disconnect.

Returns

Promise<void>

A promise that resolves when the client is successfully disconnected from the session.

Throws

If an error occurs while disconnecting the client or if the session or connection with the given IDs do not exist.

Example
await videoClient.disconnectClient(SESSION_ID, CONNECTION_ID);
disconnectWebsocket()
disconnectWebsocket(callId): Promise<void>

Defined in: video/lib/video.ts:343

Disconnects a WebSocket connection associated with a call or session.

Parameters
callId

string

The ID of the call or session to which the WebSocket connection is associated.

Returns

Promise<void>

A promise that resolves when the WebSocket connection is successfully disconnected.

Throws

If an error occurs while disconnecting the WebSocket connection or if the call or session with the given ID does not exist.

Example
await videoClient.disconnectWebsocket(CALL_ID);
enableCaptions()
enableCaptions(
   sessionId, 
   clientToken, 
captionOptions?): Promise<EnableCaptionResponse>

Defined in: video/lib/video.ts:364

Enables captions for a session using the specified client token and caption options.

Parameters
sessionId

string

The ID of the session to enable captions for.

clientToken

string

The client token associated with the session, used for authentication.

captionOptions?

CaptionOptions = {}

Optional caption options to configure caption behavior.

Returns

Promise<EnableCaptionResponse>

A promise that resolves with an EnableCaptionResponse containing information about the enabled captions.

Throws

If an error occurs while enabling captions or if the session with the given ID does not exist.

Example
const result = await videoClient.enableCaptions(SESSION_ID, CLIENT_TOKEN);
console.log(result.captionId);
forceMuteAll()
forceMuteAll(sessionId, excludedStreamIds?): Promise<ProjectDetailsResponse>

Defined in: video/lib/video.ts:395

Forces muting of all streams in a session, except those specified in the excludedStreamIds array.

Parameters
sessionId

string

The ID of the session in which to force mute streams.

excludedStreamIds?

string[] = []

An optional array of stream IDs to exclude from muting.

Returns

Promise<ProjectDetailsResponse>

A promise that resolves with a ProjectDetailsResponse containing updated session details after muting.

Throws

If an error occurs while muting the streams or if the session with the given ID does not exist.

Example
const forceMute = await videoClient.forceMuteAll(SESSION_ID);
console.log(forceMute.status);
generateClientToken()
generateClientToken(sessionId, tokenOptions?): string

Defined in: video/lib/video.ts:415

Generates a client token for connecting to a session with the specified options.

Parameters
sessionId

string

The ID of the session to generate the client token for.

tokenOptions?

ClientTokenOptions

Optional token options including role, data, and expiration time.

Returns

string

A client token that can be used for authentication when connecting to a session.

Example
const token = videoClient.generateClientToken(SESSION_ID);
console.log(`The token is ${token}`);
getArchive()
getArchive(archiveId): Promise<SingleArchiveResponse>

Defined in: video/lib/video.ts:464

Retrieves information about a specific archive by its ID.

Parameters
archiveId

string

The ID of the archive to retrieve.

Returns

Promise<SingleArchiveResponse>

A promise that resolves to the details of the requested archive.

Example
const archive = await videoClient.getArchive(ARCHIVE_ID);
console.log(archive.createdAt);
getBroadcast()
getBroadcast(broadcastId): Promise<BroadcastDetailsResponse>

Defined in: video/lib/video.ts:482

Retrieves information about a specific broadcast by its ID.

Parameters
broadcastId

string

The ID of the broadcast to retrieve.

Returns

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()
getCaptionStatus(captionId): Promise<CaptionStatusResponse>

Defined in: video/lib/video.ts:503

Retrieves the status of a caption by its ID.

Parameters
captionId

string

The ID of the caption to retrieve the status for.

Returns

Promise<CaptionStatusResponse>

A promise that resolves to the status of the requested caption.

Example
const captionStatus = await videoClient.getCaptionStatus(CAPTION_ID);
console.log(captionStatus.status);
getConfig()
getConfig(): ConfigParams

Defined in: server-client/dist/lib/client.d.ts:36

Returns

ConfigParams

Inherited from

Client.getConfig

getExperienceComposerRender()
getExperienceComposerRender(renderId): Promise<ExperienceComposerResponse>

Defined in: video/lib/video.ts:524

Retrieves the details of an Experience Composer render by its ID.

Parameters
renderId

string

The ID of the Experience Composer render to retrieve.

Returns

Promise<ExperienceComposerResponse>

A promise that resolves to the details of the requested Experience Composer render.

Example
const render = await videoClient.getExperienceComposerRender(RENDER_ID);
console.log(render.createdAt);
getStreamInfo()
getStreamInfo(sessionId, streamId?): Promise<
  | SingleStreamLayoutResponse
| MultiStreamLayoutResponse>

Defined in: video/lib/video.ts:553

Retrieves information about one or more streams in a session.

Parameters
sessionId

string

The ID of the session to retrieve stream information from.

streamId?

string

Optional. The ID of a specific stream to retrieve information for.

Returns

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).

Example
const streamInfo = await videoClient.getStreamInfo(SESSION_ID);

if (streamInfo.items) {
  streamInfo.items.forEach((item) => {
    console.log(item.id);
  });
} else {
 console.log(streamInfo.id);
}
intiateSIPCall()
intiateSIPCall(sessionId, options): Promise<SIPCallResponse>

Defined in: video/lib/video.ts:611

Initiates a SIP call within a session.

Parameters
sessionId

string

The ID of the session in which to initiate the SIP call.

options

SIPCallOptions

The options for initiating the SIP call.

Returns

Promise<SIPCallResponse>

A promise that resolves to the SIP call response, including the call ID and other details.

Examples

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()
listExperienceComposerRenders(filter): Promise<MultiExperienceComposerResponse>

Defined in: video/lib/video.ts:644

Lists Experience Composer renders based on the specified filter criteria.

Parameters
filter

ExperienceComposerListFilter

An optional filter to apply when listing Experience Composer renders.

Returns

Promise<MultiExperienceComposerResponse>

A promise that resolves to a list of Experience Composer renders matching the filter criteria.

Example
const renders = await videoClient.listExperienceComposerRenders();
for (const render of renders.items) {
  console.log(render.id);
}
muteAllStreams()
protected muteAllStreams(
   sessionId, 
   active, 
excludedStreamIds): Promise<ProjectDetailsResponse>

Defined in: video/lib/video.ts:668

Mutes or unmutes all streams in a session, optionally excluding specific stream IDs from muting.

Parameters
sessionId

string

The ID of the session in which to mute or unmute streams.

active

boolean

true to mute all streams, false to unmute all streams.

excludedStreamIds

string[] = []

An optional array of stream IDs to exclude from muting/unmuting.

Returns

Promise<ProjectDetailsResponse>

A promise that resolves to the updated session details.

Example
const forceMute = await videoClient.muteAll(SESSION_ID);
console.log(forceMute.status);
muteStream()
muteStream(sessionId, streamId): Promise<ProjectDetailsResponse>

Defined in: video/lib/video.ts:696

Mutes or unmutes a specific stream in a session.

Parameters
sessionId

string

The ID of the session containing the stream.

streamId

string

The ID of the stream to mute or unmute.

Returns

Promise<ProjectDetailsResponse>

A promise that resolves to the updated session details.

Example
const forceMute = await videoClient.muteStream(SESSION_ID, STREAM_ID);
console.log(forceMute.status);
parseResponse()
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.

Type Parameters

T

The expected type of the parsed response data.

Parameters
request

VetchOptions

The request options.

response

Response

The raw response from the request.

Returns

Promise<VetchResponse<T>>

  • The parsed response.
Inherited from

Client.parseResponse

playDTMF()
playDTMF(
   sessionId, 
   digits, 
connectionId?): Promise<void>

Defined in: video/lib/video.ts:719

Sends DTMF (Dual-Tone Multi-Frequency) tones to a specific session or connection.

Parameters
sessionId

string

The ID of the session to send DTMF tones to.

digits

string

The DTMF tones to play.

connectionId?

string

Optional. The ID of the connection within the session to send DTMF tones to.

Returns

Promise<void>

A promise that resolves when the DTMF tones have been played.

Example
await videoClient.playDTMF(SESSION_ID, '1234');
prepareBody()
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.

Parameters
request

VetchOptions

The request options.

Returns

undefined | string

  • The prepared request body as a string or undefined.
Inherited from

Client.prepareBody

prepareRequest()
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.

Parameters
request

VetchOptions

The initial request options.

Returns

Promise<VetchOptions>

  • The modified request options.
Inherited from

Client.prepareRequest

removeArchiveStream()
removeArchiveStream(archiveId, streamId): Promise<void>

Defined in: video/lib/video.ts:744

Removes a stream from an archive.

Parameters
archiveId

string

The ID of the archive from which to remove the stream.

streamId

string

The ID of the stream to remove from the archive.

Returns

Promise<void>

A promise that resolves when the stream has been successfully removed from the archive.

Example
await videoClient.removeArchiveStream(ARCHIVE_ID, STREAM_ID);
removeStreamFromBroadcast()
removeStreamFromBroadcast(broadcastId, streamId): Promise<void>

Defined in: video/lib/video.ts:766

Removes a stream from a broadcast.

Parameters
broadcastId

string

The ID of the broadcast from which to remove the stream.

streamId

string

The ID of the stream to remove from the broadcast.

Returns

Promise<void>

A promise that resolves when the stream has been successfully removed from the broadcast.

Example
await videoClient.removeStreamFromBroadcast(BROADCAST_ID, STREAM_ID);
searchArchives()
searchArchives(filter?): Promise<MultiArchiveResponse>

Defined in: video/lib/video.ts:798

Searches for archives based on the specified filter criteria.

Parameters
filter?

ArchiveSearchFilter

Optional filter criteria to narrow down the search.

Returns

Promise<MultiArchiveResponse>

A promise that resolves with the search results, including multiple archive items.

Examples
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()
searchBroadcasts(filter?): Promise<MultiBroadcastResponse>

Defined in: video/lib/video.ts:833

Searches for broadcasts based on the specified filter criteria.

Parameters
filter?

BroadcastSearchFilter

Optional filter criteria to narrow down the search.

Returns

Promise<MultiBroadcastResponse>

A promise that resolves with the search results, including multiple broadcast items.

Examples
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()
sendDeleteRequest<T>(url): Promise<VetchResponse<T>>

Defined in: server-client/dist/lib/client.d.ts:78

Sends a DELETE request to the specified URL.

Type Parameters

T

Parameters
url

string

The URL endpoint for the DELETE request.

Returns

Promise<VetchResponse<T>>

  • The response from the DELETE request.
Inherited from

Client.sendDeleteRequest

sendFormSubmitRequest()
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.

Type Parameters

T

Parameters
url

string

The URL endpoint for the POST request.

payload?

Record<string, undefined | string>

Optional payload containing form data to send with the POST request.

Returns

Promise<VetchResponse<T>>

  • The response from the POST request.
Inherited from

Client.sendFormSubmitRequest

sendGetRequest()
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.

Type Parameters

T

Parameters
url

string

The URL endpoint for the GET request.

queryParams?

Optional query parameters to append to the URL. These should be compatible with Node's URLSearchParams.

Returns

Promise<VetchResponse<T>>

  • The response from the GET request.
Inherited from

Client.sendGetRequest

sendPatchRequest()
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.

Type Parameters

T

Parameters
url

string

The URL endpoint for the PATCH request.

payload?

Optional payload to be sent as the body of the PATCH request.

Returns

Promise<VetchResponse<T>>

  • The response from the PATCH request.
Inherited from

Client.sendPatchRequest

sendPostRequest()
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.

Type Parameters

T

Parameters
url

string

The URL endpoint for the POST request.

payload?

Optional payload to be sent as the body of the POST request.

Returns

Promise<VetchResponse<T>>

  • The response from the POST request.
Inherited from

Client.sendPostRequest

sendPutRequest()
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.

Type Parameters

T

Parameters
url

string

The URL endpoint for the PUT request.

payload?

Optional payload to be sent as the body of the PUT request.

Returns

Promise<VetchResponse<T>>

  • The response from the PUT request.
Inherited from

Client.sendPutRequest

sendRequest()
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.

Type Parameters

T

Parameters
request

VetchOptions

The options defining the request, including URL, method, headers, and data.

Returns

Promise<VetchResponse<T>>

  • The parsed response from the request.
Inherited from

Client.sendRequest

sendRequestWithData()
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.

Type Parameters

T

Parameters
method

The HTTP method to be used for the request (only POST, PATCH, or PUT are acceptable).

POST | PUT | PATCH

url

string

The URL endpoint for the request.

payload?

Optional payload to be sent as the body of the request, JSON-encoded.

Returns

Promise<VetchResponse<T>>

  • The response from the request.
Inherited from

Client.sendRequestWithData

sendSignal()
sendSignal(
   signal, 
   sessionId, 
connectionId?): Promise<void>

Defined in: video/lib/video.ts:861

Sends a signal to a session or a specific connection within a session.

Parameters
signal

Signal

The signal to send, including a type and data.

sessionId

string

The ID of the session to which the signal will be sent.

connectionId?

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.

Returns

Promise<void>

A promise that resolves when the signal is successfully sent.

Example
await videoClient.sendSignal(
  {
    type: 'text',
    data: 'Hello world!',
  },
  SESSION_ID,
);

##### setStreamClassLists()

```ts
setStreamClassLists(sessionId, settings): Promise<void>

Defined in: video/lib/video.ts:895

Sets the stream class lists for one or more streams within a session.

Parameters
sessionId

string

The ID of the session for which stream class lists will be set.

settings

StreamClassList[]

An array of objects specifying the stream ID and corresponding class lists to be set.

Returns

Promise<void>

A promise that resolves when the stream class lists are successfully set.

Example
await videoClient.setStreamClassLists(
  SESSION_ID,
  [
    {
      id: STREAM_ID,
      layoutClassList: ['full'],
    }
  ]
)
startArchive()
startArchive(sessionId, options?): Promise<SingleArchiveResponse>

Defined in: video/lib/video.ts:918

Starts an archive for a given session with optional configuration.

Parameters
sessionId

string

The ID of the session to archive.

options?

ArchiveOptions

Optional configuration for the archive, such as audio/video settings, layout, and more.

Returns

Promise<SingleArchiveResponse>

A promise that resolves with information about the started archive.

Example
const archive = await videoClient.startArchive(SESSION_ID);
console.log(archive.id);
startBroadcast()
startBroadcast(sessionId, config): Promise<BroadcastDetailsResponse>

Defined in: video/lib/video.ts:955

Starts a broadcast for a given session with the specified configuration.

Parameters
sessionId

string

The ID of the session to start broadcasting.

config

BroadcastConfig

Configuration for the broadcast, including stream settings, layout, and more.

Returns

Promise<BroadcastDetailsResponse>

A promise that resolves with information about the started broadcast.

Example
const broadcast = await videoClient.startBroadcast(
  SESSION_ID,
  {
    outputs: {
      hls: {
        lowLatency: true,
      }
      rtmp: [{
        serverUrl: 'rtmp://example.com',
      }],
    }
  }
);
startExperienceComposerRender()
startExperienceComposerRender(
   sessionId, 
   token, 
config): Promise<ExperienceComposerResponse>

Defined in: video/lib/video.ts:986

Starts rendering an experience composer with the provided configuration.

Parameters
sessionId

string

The ID of the session associated with the experience composer.

token

string

The client token for authentication.

config

ExperienceComposerOptions

Configuration options for the experience composer rendering.

Returns

Promise<ExperienceComposerResponse>

A promise that resolves with information about the started experience composer rendering.

Example
const render = await videoClient.startExperienceComposerRender(
  SESSION_ID,
  token,
)

console.log(render.id);
stopArchive()
stopArchive(archiveId): Promise<SingleArchiveResponse>

Defined in: video/lib/video.ts:1012

Stops an archive with the given archive ID.

Parameters
archiveId

string

The ID of the archive to stop.

Returns

Promise<SingleArchiveResponse>

A promise that resolves with information about the stopped archive.

Example
const archive = await videoClient.stopArchive(ARCHIVE_ID);

console.log(archive.status);
stopBroadcast()
stopBroadcast(broadcastId): Promise<BroadcastDetailsResponse>

Defined in: video/lib/video.ts:1031

Stops a broadcast with the given broadcast ID.

Parameters
broadcastId

string

The ID of the broadcast to stop.

Returns

Promise<BroadcastDetailsResponse>

A promise that resolves with information about the stopped broadcast.

Example
const broadcast = await videoClient.stopBroadcast(BROADCAST_ID);
console.log(broadcast.status);
stopExperienceComposerRender()
stopExperienceComposerRender(renderId): Promise<void>

Defined in: video/lib/video.ts:1051

Stops an Experience Composer render with the given render ID.

Parameters
renderId

string

The ID of the Experience Composer render to stop.

Returns

Promise<void>

A promise that resolves when the render is successfully stopped.

Example
await videoClient.stopExperienceComposerRender(RENDER_ID);
updateArchiveLayout()
updateArchiveLayout(archiveId, layout): Promise<void>

Defined in: video/lib/video.ts:1069

Updates the layout of an archive with the given archive ID.

Parameters
archiveId

string

The ID of the archive to update the layout for.

layout

ArchiveLayout

The new layout configuration to set for the archive.

Returns

Promise<void>

A promise that resolves when the layout is successfully updated.

Example
await videoClient.updateArchiveLayout(
updateBroadcast()
updateBroadcast(config): Promise<void>

Defined in: video/lib/video.ts:1094

Updates the configuration of a broadcast with the given broadcast ID.

Parameters
config

BroadcastUpdateConfig

The configuration options to update the broadcast.

Returns

Promise<void>

A promise that resolves when the broadcast is successfully updated.

Example
await videoClient.updateBroadcast({
  broadcastId: BROADCAST_ID,
  hasAudio: true,
})

Type Aliases

ArchiveLayout

type ArchiveLayout = object;

Defined in: video/lib/types/ArchiveLayout.ts:6

Represents the layout configuration for an archive.

Type declaration

screenshareType?
optional screenshareType: string;

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).

stylesheet?
optional stylesheet: string;

Optional: The stylesheet used for custom layout (only applicable if type is 'custom').

type
type: LayoutType;

The type of layout to be used for the archive.


ArchiveOptions

type ArchiveOptions = object;

Defined in: video/lib/types/ArchiveOptions.ts:7

Interface representing options for creating an archive.

Type declaration

hasAudio?
optional hasAudio: boolean;

Flag indicating whether audio should be included in the archive.

hasVideo?
optional hasVideo: boolean;

Flag indicating whether video should be included in the archive.

layout?
optional layout: ArchiveLayout;

Layout configuration for the archive.

maxBitrate?
optional maxBitrate: number;

The maximum video bitrate for the archive, in bits per second

name?
optional name: string;

Name of the archive.

outputMode?
optional outputMode: ArchiveOutputMode;

Output mode for the archive.

resolution?
optional resolution: Resolution;

Resolution for the archive.

streamMode?
optional streamMode: StreamMode;

Stream mode for the archive.


ArchiveSearchFilter

type ArchiveSearchFilter = object;

Defined in: video/lib/types/ArchiveSearchFilter.ts:4

Interface representing filters for searching archives.

Type declaration

count?
optional count: number;

The number of archives to retrieve starting at the offset. Default is 50, with a maximum of 1000.

offset?
optional offset: number;

The start offset in the list of existing archives.

sessionId?
optional sessionId: string;

Retrieve archives for a specific session ID.


BroadcastConfig

type BroadcastConfig = object;

Defined in: video/lib/types/BroadcastConfig.ts:37

Interface representing configuration options for a live streaming broadcast.

Type declaration

hasAudio?
optional hasAudio: boolean;

Whether the broadcast has audio.

hasVideo?
optional hasVideo: boolean;

Whether the broadcast has video.

layout?
optional layout: LayoutType;

The layout type for the broadcast.

maxBitrate?
optional maxBitrate: number;

The maximum bitrate for the stream.

maxDuration?
optional maxDuration: number;

The maximum duration for the broadcast, in seconds. The broadcast will automatically stop when the maximum duration is reached.

multiBroadcastTag?
optional multiBroadcastTag: string;

The unique tag for simultaneous broadcasts (if one was set).

outputs
outputs: BroadcastOutputs;

Configuration options for different types of broadcast streams (HLS and RTMP).

resolution?
optional resolution: Resolution;

The resolution of the broadcast.

streamMode?
optional streamMode: StreamMode;

The stream mode for the broadcast.


BroadcastDetailsResponse

type BroadcastDetailsResponse = object;

Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:17

Represents the response containing details about a live streaming broadcast.

Type declaration

applicationId
applicationId: string;

The Vonage Application UUID.

broadcastUrls
broadcastUrls: object;

An object containing details about the HLS and RTMP broadcasts.

broadcastUrls.hls?
optional broadcastUrls.hls: string;

The URL for the HLS broadcast.

broadcastUrls.rtmp
broadcastUrls.rtmp: RTMPStream[];

An array of RTMP streams.

createdAt
createdAt: number;

The time the broadcast started, expressed in milliseconds since the Unix epoch (January 1, 1970, 00:00:00 UTC).

hasAudio
hasAudio: boolean;

Indicates whether the broadcast has audio.

hasVideo
hasVideo: boolean;

Indicates whether the broadcast has video.

id
id: string;

The unique ID for the broadcast.

maxBitrate?
optional maxBitrate: number;

The maximum bitrate for the stream.

maxDuration?
optional maxDuration: number;

The maximum duration for the broadcast (if one was set), in seconds.

multiBroadcasTag?
optional multiBroadcasTag: string;

The unique tag for simultaneous broadcasts (if one was set).

resolution?
optional resolution: Resolution;

The resolution of the broadcast, if set.

sessionId
sessionId: string;

The Vonage Video session ID associated with the broadcast.

settings?
optional settings: object;

An object containing settings for HLS.

settings.hls?
optional settings.hls: HlsSettings;

HLS settings.

streamMode
streamMode: StreamMode;

The stream mode for the broadcast.

updatedAt
updatedAt: number;

The timestamp when the broadcast was last updated, expressed in milliseconds since the Unix epoch.


BroadcastOutputs

type BroadcastOutputs = object;

Defined in: video/lib/types/BroadcastConfig.ts:22

Interface representing configuration options for different types of broadcast streams (HLS and RTMP).

Type declaration

hls?
optional hls: HLSConfig;

Configuration options for HLS streaming.

rtmp
rtmp: RTMPStream[];

Configuration options for RTMP streaming.


BroadcastSearchFilter

type BroadcastSearchFilter = object;

Defined in: video/lib/types/BroadcastSearchFilter.ts:4

Interface representing a filter for searching broadcasts.

Type declaration

count?
optional count: number;

The maximum number of items to return.

offset?
optional offset: number;

The offset for paginating the results.

sessionId?
optional sessionId: string;

The session ID to filter broadcasts by.


BroadcastUpdateConfig

type BroadcastUpdateConfig = object;

Defined in: video/lib/types/BroadcastUpdateConfig.ts:4

Interface representing the configuration for updating a broadcast.

Type declaration

addStream?
optional addStream: string;

The ID of a stream to add to the broadcast.

broadcastId
broadcastId: string;

The ID of the broadcast to update.

hasAudio?
optional hasAudio: boolean;

Whether to include audio in the broadcast.

hasVideo?
optional hasVideo: boolean;

Whether to include video in the broadcast.

removeStream?
optional removeStream: string;

The ID of a stream to remove from the broadcast.


CaptionOptions

type CaptionOptions = object;

Defined in: video/lib/types/CaptionOptions.ts:4

Interface representing options for captions.

Type declaration

languageCode?
optional languageCode: "en-us";

The language code for captions (e.g., "en-us").

maxDuration?
optional maxDuration: number;

The maximum duration for captions.

partialCaptions?
optional partialCaptions: "true" | "false";

Whether to generate partial captions.

statusCallbackUrl?
optional statusCallbackUrl: string;

The URL for the status callback of captions.


CaptionStatusResponse

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.

Type declaration

applicationId
applicationId: string;

The Vonage Application UUID.

captionId
captionId: string;

The unique ID for the caption.

createdAt
createdAt: number;

The time when the caption was created, expressed in milliseconds since the Unix epoch (January 1, 1970, 00:00:00 UTC).

duration
duration: number;

The duration of the caption, in seconds.

languageCode
languageCode: "en-us";

The language code of the captions (e.g., "en-us" for English, US).

provider
provider: "aws-transcribe";

The caption provider (e.g., "aws-transcribe").

reason?
optional reason: string;

An optional reason for the caption status.

sessionId
sessionId: string;

The Vonage Video session ID associated with the broadcast.

status
status: CaptionStatus;

The status of the captions.

updatedAt
updatedAt: number;

The timestamp when the caption was last updated, expressed in milliseconds since the Unix epoch.


ClientTokenClaims

type ClientTokenClaims = object;

Defined in: video/lib/types/ClientTokenClaims.ts:4

Interface representing claims for a client token.

Type declaration

acl
acl: object;

Access control list (ACL) for paths.

acl.paths
acl.paths: object;

Paths and associated objects in the ACL.

Index Signature
[key: string]: object
connection_data?
optional connection_data: string;

Connection data associated with the token (optional).

data?
optional data: string;

Additional data for the token (optional).

exp?
optional exp: number;

The expiration time of the token (optional).

initial_layout_class_list
initial_layout_class_list: string;

The initial layout class list.

role
role: string;

The role of the token.

scope
scope: string;

The scope of the token.

session_id
session_id: string;

The session ID associated with the token.

sub
sub: string;

The subject of the token.


ClientTokenOptions

type ClientTokenOptions = object;

Defined in: video/lib/types/ClientTokenOptions.ts:4

Interface representing options for generating a client token.

Type declaration

data?
optional data: string;

Additional data for the client token (optional).

expireTime?
optional expireTime: number;

The expiration time of the client token in seconds (optional).

initialLayoutClassList?
optional initialLayoutClassList: string[];

An array of initial layout class list for the client token (optional).

role?
optional role: string;

The role associated with the client token (optional).


CreateSessionResponse

type CreateSessionResponse = object;

Defined in: video/lib/types/Response/CreateSessionResponse.ts:4

Represents a response containing the details of a created session.

Type declaration

create_dt
create_dt: string;

The creation date and time of the session in string format.

media_server_url
media_server_url: string;

The URL of the media server associated with the session.

project_id
project_id: string;

The project ID associated with the session.

session_id
session_id: string;

The unique session ID.


EnableCaptionResponse

type EnableCaptionResponse = object;

Defined in: video/lib/types/Response/EnableCaptionResponse.ts:4

Represents a response indicating the ID of the enabled caption.

Type declaration

captionsId
captionsId: string;

The unique ID of the enabled caption.


ExperienceComposerListFilter

type ExperienceComposerListFilter = object;

Defined in: video/lib/types/ExperienceComposerListFilter.ts:4

Interface representing filters for listing Experience Composer items.

Type declaration

count?
optional count: number;

The maximum number of items to retrieve (optional).

offset?
optional offset: number;

The offset for paginating through the list (optional).


ExperienceComposerOptions

type ExperienceComposerOptions = object;

Defined in: video/lib/types/ExperienceComposerOptions.ts:6

Interface representing options for creating an Experience Composer.

Type declaration

maxDuration?
optional maxDuration: number;

The maximum duration for the Experience Composer (optional).

properties?
optional properties: object;

Optional properties for the Experience Composer.

properties.name?
optional properties.name: string;

The name of the Experience Composer.

resolution?
optional resolution: ExperienceComposerResolution;

The resolution of the Experience Composer (optional).

statusCallbackUrl?
optional statusCallbackUrl: string;

The callback URL for status updates (optional).

url
url: string;

The URL of the Experience Composer.


ExperienceComposerResponse

type ExperienceComposerResponse = object;

Defined in: video/lib/types/Response/ExperienceComposerResponse.ts:6

Represents a response from the Experience Composer.

Type declaration

applicationId
applicationId: string;

The application ID associated with the response.

createdAt
createdAt: number;

The timestamp when the response was created (milliseconds since the Unix epoch).

id
id: string;

The unique ID of the response.

reason?
optional reason: string;

An optional reason for the status, if available.

resolution
resolution: ExperienceComposerResolution;

The resolution used by the Experience Composer.

sessionId
sessionId: string;

The session ID associated with the response.

status
status: "starting" | "started" | "stopped" | "failed";

The status of the response, which can be one of: "starting", "started", "stopped", "failed".

streamId
streamId: string;

The stream ID associated with the response.

updatedAt
updatedAt: number;

The timestamp when the response was last updated (milliseconds since the Unix epoch).

url
url: string;

The URL associated with the response.


HLSConfig

type HLSConfig = object;

Defined in: video/lib/types/BroadcastConfig.ts:7

Interface representing configuration options for HLS streaming.

Type declaration

dvr?
optional dvr: boolean;

Whether to enable DVR functionality (rewinding, pausing, and resuming) in players that support it.

lowLatency?
optional lowLatency: boolean;

Whether to enable low-latency mode for the HLS stream.


HlsSettings

type HlsSettings = object;

Defined in: video/lib/types/Response/BroadcastDetailsResponse.ts:7

Represents HLS settings for a live streaming broadcast.

Type declaration

lowLatency?
optional lowLatency: boolean;

Whether to enable low-latency mode for the HLS stream.


InitiateSIPCallRequest

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.

Type declaration

sessionId
sessionId: string;

The session ID of the Vonage Video session to associate with the SIP call.


MultiArchiveResponse

type MultiArchiveResponse = object;

Defined in: video/lib/types/Response/MultiArchiveResponse.ts:6

Represents a response containing multiple archive items.

Type declaration

count
count: number;

The count of archive items in the response.

items
items: SingleArchiveResponse[];

An array of SingleArchiveResponse objects representing individual archive items.


MultiBroadcastResponse

type MultiBroadcastResponse = object;

Defined in: video/lib/types/Response/MultiBroadcastResponse.ts:6

Represents a response containing multiple broadcast details items.

Type declaration

count
count: number;

The count of broadcast details items in the response.

items
items: BroadcastDetailsResponse[];

An array of BroadcastDetailsResponse objects representing individual broadcast details items.


MultiExperienceComposerResponse

type MultiExperienceComposerResponse = object;

Defined in: video/lib/types/Response/MultiExperienceComposerResponse.ts:6

Represents a response containing multiple ExperienceComposerResponse items.

Type declaration

count
count: number;

The count of ExperienceComposerResponse items in the response.

items
items: ExperienceComposerResponse[];

An array of ExperienceComposerResponse objects representing individual items.


MultiStreamLayoutResponse

type MultiStreamLayoutResponse = object;

Defined in: video/lib/types/Response/MultiStreamLayoutResponse.ts:6

Represents a response containing multiple SingleStreamLayoutResponse items.

Type declaration

count
count: number;

The count of SingleStreamLayoutResponse items in the response.

items
items: SingleStreamLayoutResponse[];

An array of SingleStreamLayoutResponse objects representing individual items.


ProjectDetailsResponse

type ProjectDetailsResponse = object;

Defined in: video/lib/types/Response/ProjectDetailsResponse.ts:4

Represents the details of a project.

Type declaration

createdAt
createdAt: number;

The timestamp when the project was created, expressed in milliseconds since the Unix epoch.

environment
environment: string;

The environment of the project.

id
id: string;

The unique identifier of the project.

name
name: string;

The name of the project.

secret
secret: string;

The secret associated with the project.

status
status: string;

The status of the project.


RTMPStream

type RTMPStream = object;

Defined in: video/lib/types/RTMPStream.ts:4

Interface representing an RTMP stream configuration.

Type declaration

id?
optional id: string;

Optional unique identifier for the RTMP stream.

serverUrl
serverUrl: string;

The RTMP server URL to which the stream will be sent.

streamName
streamName: string;

The name of the stream on the RTMP server.


Session

type Session = object;

Defined in: video/lib/types/Session.ts:4

Interface representing a session configuration.

Type declaration

archiveMode
archiveMode: string;

The archive mode for the session (e.g., "MANUAL" or "ALWAYS").

location
location: string;

The location of the session.

mediaMode
mediaMode: string;

The media mode for the session (e.g., "ROUTED" or "RELAYED").

sessionId
sessionId: string;

The unique identifier for the session.


Signal

type Signal = object;

Defined in: video/lib/types/Singal.ts:4

Represents a signal containing type and data properties.

Type declaration

data
data: string;

The data associated with the signal, which can be any string data related to the signal.

type
type: string;

The type of the signal, which can be a custom string identifying the signal type.


SingleArchiveResponse

type SingleArchiveResponse = object;

Defined in: video/lib/types/Response/SingleArchiveResponse.ts:4

Represents the details of a single archive.

Type declaration

createdAt
createdAt: number;

The timestamp when the archive was created, expressed in milliseconds since the Unix epoch.

duration
duration: number;

The duration of the archive in seconds.

hasAudio
hasAudio: boolean;

Indicates whether the archive has audio.

hasVideo
hasVideo: boolean;

Indicates whether the archive has video.

id
id: string;

The unique identifier of the archive.

name
name: string;

The name of the archive.

outputMode
outputMode: string;

The output mode of the archive.

projectId
projectId: string;

The unique identifier of the project to which the archive belongs.

reason
reason: string;

The reason for the archive status.

resolution
resolution: string;

The resolution of the archive.

sessionId
sessionId: string;

The unique identifier of the session associated with the archive.

size
size: number;

The size of the archive in bytes.

status
status: string;

The status of the archive.

streamMode
streamMode: string;

The stream mode of the archive.

streams?
optional streams: string[];

An array of stream identifiers associated with the archive.

url?
optional url: string;

The URL of the archive.


SingleStreamLayoutResponse

type SingleStreamLayoutResponse = object;

Defined in: video/lib/types/Response/SingleStreamLayoutResponse.ts:4

Represents the details of a single stream layout.

Type declaration

id
id: string;

The unique identifier of the stream layout.

layoutClassList
layoutClassList: string[];

An array of CSS class names associated with the layout.

name
name: string;

The name of the stream layout.

videoType
videoType: string;

The type of video associated with the stream layout.


SIPCallOptions

type SIPCallOptions = object;

Defined in: video/lib/types/SIPCallOptions.ts:56

Interface representing options for initiating a SIP call.

Type declaration

sip
sip: SIPCallSIPConfig;

Configuration options for the SIP call.

token
token: string;

The authentication token for the SIP call.


SIPCallResponse

type SIPCallResponse = object;

Defined in: video/lib/types/Response/SIPCallResponse.ts:4

Represents the response for a SIP call initiation.

Type declaration

connectionId
connectionId: string;

The connection identifier associated with the SIP call.

id
id: string;

The unique identifier of the SIP call.

streamId
streamId: string;

The stream identifier associated with the SIP call.


SIPCallSIPConfig

type SIPCallSIPConfig = object;

Defined in: video/lib/types/SIPCallOptions.ts:4

Configuration options for a SIP call.

Type declaration

auth?
optional auth: object;

Authentication credentials for the SIP call.

auth.password
auth.password: string;

The password for SIP authentication.

auth.username
auth.username: string;

The username for SIP authentication.

from?
optional from: string;

The optional "from" field for the SIP call.

headers?
optional headers: object;

Custom headers to be included in the SIP call.

Index Signature
[key: string]: string
observeForceMute?
optional observeForceMute: boolean;

Indicates whether to observe and force mute for the SIP call.

secure?
optional secure: boolean;

Indicates whether the SIP call should be secure.

uri
uri: string;

The SIP URI to initiate the call.

video?
optional video: boolean;

Indicates whether video is enabled for the SIP call.


StreamClassList

type StreamClassList = object;

Defined in: video/lib/types/StreamClassList.ts:4

Represents a stream with associated layout class list.

Type declaration

id
id: string;

The ID of the stream.

layoutClassList
layoutClassList: string[];

An array of layout class names associated with the stream.


VideoClassParameters

type VideoClassParameters = AuthParams & VetchOptions & object;

Defined in: video/lib/parameters/VideoClassParameters.ts:8

Parameters required to initialize the Video class.

Type declaration

applicationId
applicationId: string;

The unique identifier for the application.

auth?
optional auth: AuthInterface;

Optional authentication interface to use for custom authentication.

privateKey
privateKey: string;

The private key used for authentication.


VideoResponse<T>

type VideoResponse<T> = VetchResponse<T>;

Defined in: video/lib/types/VideoResponse.ts:6

Represents a video response that wraps a Vetch response.

Type Parameters

T


WebSocketConfig

type WebSocketConfig = object;

Defined in: video/lib/types/WebSocketConfig.ts:6

Configuration options for establishing a WebSocket connection.

Type declaration

audioRate?
optional audioRate: AudioRate;

The audio rate to be used for the WebSocket connection.

headers?
optional headers: object;

Optional headers to include in the WebSocket request.

Index Signature
[key: string]: string
streams?
optional streams: string[];

An array of stream IDs to associate with the WebSocket connection.

uri
uri: string;

The URI to connect to the WebSocket server.


WebSocketConnectResponse

type WebSocketConnectResponse = object;

Defined in: video/lib/types/Response/WebSocketConnectResponse.ts:4

Represents the response for a WebSocket connection.

Type declaration

connectionId
connectionId: string;

The connection identifier associated with the WebSocket connection.

id
id: string;

The unique identifier of the WebSocket connection.

Clone this wiki locally