Class: VideoCaptions
Captions of a video
Example
console.log(video.captions.languages.map((l) => `${l.code} - ${l.name}`)); // printing out available languages for captions
console.log(await video.captions.get("en")); // printing out captions of a specific language using language code
Hierarchy
↳
VideoCaptions
Properties
client
• client: Client
An instance of Client
Inherited from
languages
• languages: CaptionLanguage
[]
List of available languages for this video
video
• Optional
video: BaseVideo
The video this captions belongs to
Methods
get
▸ get(languageCode?
, translationLanguageCode?
): Promise
<undefined
| Caption
[]>
Get captions of a specific language or a translation of a specific language
Parameters
Name | Type |
---|---|
languageCode? | string |
translationLanguageCode? | string |
Returns
Promise
<undefined
| Caption
[]>