diff --git a/.changeset/seven-balloons-protect.md b/.changeset/seven-balloons-protect.md new file mode 100644 index 00000000..aae95094 --- /dev/null +++ b/.changeset/seven-balloons-protect.md @@ -0,0 +1,5 @@ +--- +"livekit-server-sdk": minor +--- + +Add support for enableTranscoding diff --git a/package.json b/package.json index f792e165..1ba4dcae 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "test:edge": "vitest --environment edge-runtime run" }, "dependencies": { - "@livekit/protocol": "^1.12.0", + "@livekit/protocol": "^1.14.0", "camelcase-keys": "^9.0.0", "jose": "^5.1.2" }, diff --git a/src/IngressClient.ts b/src/IngressClient.ts index 1fc651b6..fa0426e9 100644 --- a/src/IngressClient.ts +++ b/src/IngressClient.ts @@ -36,9 +36,15 @@ export interface CreateIngressOptions { */ participantMetadata?: string; /** + * @deprecated use `enableTranscoding` instead. * whether to skip transcoding and forward the input media directly. Only supported by WHIP */ bypassTranscoding?: boolean; + /** + * whether to enable transcoding or forward the input media directly. + * Transcoding is required for all input types except WHIP. For WHIP, the default is to not transcode. + */ + enableTranscoding?: boolean | undefined; /** * url of the media to pull for ingresses of type URL */ @@ -75,9 +81,15 @@ export interface UpdateIngressOptions { */ participantMetadata?: string; /** + * @deprecated use `enableTranscoding` instead * whether to skip transcoding and forward the input media directly. Only supported by WHIP */ bypassTranscoding?: boolean | undefined; + /** + * whether to enable transcoding or forward the input media directly. + * Transcoding is required for all input types except WHIP. For WHIP, the default is to not transcode. + */ + enableTranscoding?: boolean | undefined; /** * custom audio encoding parameters. optional */ @@ -127,6 +139,7 @@ export class IngressClient extends ServiceBase { let participantIdentity: string = ''; let participantMetadata: string | undefined; let bypassTranscoding: boolean = false; + let enableTranscoding: boolean | undefined; let url: string = ''; let audio: IngressAudioOptions | undefined; let video: IngressVideoOptions | undefined; @@ -137,6 +150,7 @@ export class IngressClient extends ServiceBase { participantName = opts.participantName || ''; participantIdentity = opts.participantIdentity || ''; bypassTranscoding = opts.bypassTranscoding || false; + enableTranscoding = opts.enableTranscoding; url = opts.url || ''; audio = opts.audio; video = opts.video; @@ -151,6 +165,7 @@ export class IngressClient extends ServiceBase { participantMetadata, participantName, bypassTranscoding, + enableTranscoding, url, audio, video, @@ -175,7 +190,7 @@ export class IngressClient extends ServiceBase { const participantName: string = opts.participantName || ''; const participantIdentity: string = opts.participantIdentity || ''; const { participantMetadata } = opts; - const { audio, video, bypassTranscoding } = opts; + const { audio, video, bypassTranscoding, enableTranscoding } = opts; const req = new UpdateIngressRequest({ ingressId, @@ -185,6 +200,7 @@ export class IngressClient extends ServiceBase { participantName, participantMetadata, bypassTranscoding, + enableTranscoding, audio, video, }).toJson();