Files
YouTube.js/docs/api/namespaces/YT/classes/TranscriptInfo.md
Luan 25d0876b91 refactor(Player)!: Use AST-based JS extraction with side-effect safe code emission (#1052)
* chore(deps): Add `meriyah`

* feat(utils): Implement AST-based JS extractors

* chore(utils): Remove old ast walker code

* fix(Player): Migrate js extraction logic

* chore(JsExtractor): Fix typo in tsdoc

* perf(JsAnalyzer): Simplify main AST analysis logic

* fix(JsAnalyzer): Change `break` to `return` in AST matching logic

* chore: Update docs

* chore: Don't export `PlayerInitializationOptions`

* chore(evaluate): Update error message to include doc link

* perf: Use a `for-loop` to find iife
2025-10-12 09:08:51 -03:00

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/af92984523f90200a18314b94478a2697c9deab0/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/af92984523f90200a18314b94478a2697c9deab0/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/af92984523f90200a18314b94478a2697c9deab0/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/af92984523f90200a18314b94478a2697c9deab0/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/af92984523f90200a18314b94478a2697c9deab0/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/af92984523f90200a18314b94478a2697c9deab0/src/parser/youtube/TranscriptInfo.ts#L26)