Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/livekit-server-sdk/src/EgressClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import type {
StreamOutput,
} from '@livekit/protocol';
import {
AudioMixing,
EgressInfo,
ListEgressRequest,
ListEgressResponse,
Expand Down Expand Up @@ -50,6 +51,10 @@ export interface RoomCompositeOptions {
* custom template url. optional
*/
customBaseUrl?: string;
/**
* audio mixing options. optional
*/
audioMixing?: AudioMixing;
}

export interface WebOptions {
Expand Down Expand Up @@ -151,6 +156,7 @@ export class EgressClient extends ServiceBase {
audioOnly?: boolean,
videoOnly?: boolean,
customBaseUrl?: string,
audioMixing?: AudioMixing,
): Promise<EgressInfo>;
async startRoomCompositeEgress(
roomName: string,
Expand All @@ -160,6 +166,7 @@ export class EgressClient extends ServiceBase {
audioOnly?: boolean,
videoOnly?: boolean,
customBaseUrl?: string,
audioMixing?: AudioMixing,
): Promise<EgressInfo> {
let layout: string | undefined;
if (optsOrLayout !== undefined) {
Expand All @@ -172,13 +179,15 @@ export class EgressClient extends ServiceBase {
audioOnly = opts.audioOnly;
videoOnly = opts.videoOnly;
customBaseUrl = opts.customBaseUrl;
audioMixing = opts.audioMixing;
}
}

layout ??= '';
audioOnly ??= false;
videoOnly ??= false;
customBaseUrl ??= '';
audioMixing ??= AudioMixing.DEFAULT_MIXING;

const {
output: legacyOutput,
Expand All @@ -193,6 +202,7 @@ export class EgressClient extends ServiceBase {
roomName,
layout,
audioOnly,
audioMixing,
videoOnly,
customBaseUrl,
output: legacyOutput,
Expand Down