mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-16 11:02:10 +00:00
102 lines
2.4 KiB
Markdown
102 lines
2.4 KiB
Markdown
[youtubei.js](../../../README.md) / [YT](../README.md) / TranscriptInfo
|
|
|
|
# Class: TranscriptInfo
|
|
|
|
## Constructors
|
|
|
|
### new TranscriptInfo()
|
|
|
|
> **new TranscriptInfo**(`actions`, `response`): [`TranscriptInfo`](TranscriptInfo.md)
|
|
|
|
#### Parameters
|
|
|
|
• **actions**: [`Actions`](../../../classes/Actions.md)
|
|
|
|
• **response**: [`ApiResponse`](../../../interfaces/ApiResponse.md)
|
|
|
|
#### Returns
|
|
|
|
[`TranscriptInfo`](TranscriptInfo.md)
|
|
|
|
#### Defined in
|
|
|
|
[src/parser/youtube/TranscriptInfo.ts:12](https://github.com/LuanRT/YouTube.js/blob/4ae0cc5c523a2080e68d6c0c1437c78fe318ea30/src/parser/youtube/TranscriptInfo.ts#L12)
|
|
|
|
## Properties
|
|
|
|
### transcript
|
|
|
|
> **transcript**: [`Transcript`](../../YTNodes/classes/Transcript.md)
|
|
|
|
#### Defined in
|
|
|
|
[src/parser/youtube/TranscriptInfo.ts:10](https://github.com/LuanRT/YouTube.js/blob/4ae0cc5c523a2080e68d6c0c1437c78fe318ea30/src/parser/youtube/TranscriptInfo.ts#L10)
|
|
|
|
## Accessors
|
|
|
|
### languages
|
|
|
|
> `get` **languages**(): `string`[]
|
|
|
|
Returns available languages.
|
|
|
|
#### Returns
|
|
|
|
`string`[]
|
|
|
|
#### Defined in
|
|
|
|
[src/parser/youtube/TranscriptInfo.ts:45](https://github.com/LuanRT/YouTube.js/blob/4ae0cc5c523a2080e68d6c0c1437c78fe318ea30/src/parser/youtube/TranscriptInfo.ts#L45)
|
|
|
|
***
|
|
|
|
### page
|
|
|
|
> `get` **page**(): [`IGetTranscriptResponse`](../../APIResponseTypes/type-aliases/IGetTranscriptResponse.md)
|
|
|
|
#### Returns
|
|
|
|
[`IGetTranscriptResponse`](../../APIResponseTypes/type-aliases/IGetTranscriptResponse.md)
|
|
|
|
#### Defined in
|
|
|
|
[src/parser/youtube/TranscriptInfo.ts:56](https://github.com/LuanRT/YouTube.js/blob/4ae0cc5c523a2080e68d6c0c1437c78fe318ea30/src/parser/youtube/TranscriptInfo.ts#L56)
|
|
|
|
***
|
|
|
|
### selectedLanguage
|
|
|
|
> `get` **selectedLanguage**(): `string`
|
|
|
|
Returns the currently selected language.
|
|
|
|
#### Returns
|
|
|
|
`string`
|
|
|
|
#### Defined in
|
|
|
|
[src/parser/youtube/TranscriptInfo.ts:52](https://github.com/LuanRT/YouTube.js/blob/4ae0cc5c523a2080e68d6c0c1437c78fe318ea30/src/parser/youtube/TranscriptInfo.ts#L52)
|
|
|
|
## Methods
|
|
|
|
### selectLanguage()
|
|
|
|
> **selectLanguage**(`language`): `Promise`\<[`TranscriptInfo`](TranscriptInfo.md)\>
|
|
|
|
Selects a language from the language menu and returns the updated transcript.
|
|
|
|
#### Parameters
|
|
|
|
• **language**: `string`
|
|
|
|
Language to select.
|
|
|
|
#### Returns
|
|
|
|
`Promise`\<[`TranscriptInfo`](TranscriptInfo.md)\>
|
|
|
|
#### Defined in
|
|
|
|
[src/parser/youtube/TranscriptInfo.ts:26](https://github.com/LuanRT/YouTube.js/blob/4ae0cc5c523a2080e68d6c0c1437c78fe318ea30/src/parser/youtube/TranscriptInfo.ts#L26)
|