Skip to content

Commit bd2203a

Browse files
committed
fix: allow type to be 'text' or 'audio' and now text_type is optional because you don't pass text_type for multi-track audio
1 parent 434b808 commit bd2203a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/video/domain.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ export interface CreatePlaybackIdParams {
217217

218218
export interface CreateTrackParams {
219219
url: string;
220-
type: 'text';
221-
text_type: 'subtitles';
220+
type: 'text' | 'audio';
221+
text_type?: 'subtitles';
222222
language_code: string;
223223
name?: string;
224224
closed_captions?: boolean;

src/video/resources/assets.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export class Assets extends Base {
265265
}
266266

267267
if (!params) {
268-
return Promise.reject(new Error('Text track params are required'));
268+
return Promise.reject(new Error('Track params are required'));
269269
}
270270
return this.http.post(`${buildBasePath(assetId)}/tracks`, params);
271271
}

0 commit comments

Comments
 (0)