Files
YouTube.js/docs/api/namespaces/Misc/classes/CommandContext.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

122 lines
3.7 KiB
Markdown

[youtubei.js](../../../README.md) / [Misc](../README.md) / CommandContext
# Class: CommandContext
## Constructors
### new CommandContext()
> **new CommandContext**(`data`): [`CommandContext`](CommandContext.md)
#### Parameters
**data**: [`RawNode`](../../APIResponseTypes/type-aliases/RawNode.md)
#### Returns
[`CommandContext`](CommandContext.md)
#### Defined in
[src/parser/classes/misc/CommandContext.ts:16](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/misc/CommandContext.ts#L16)
## Properties
### on\_first\_visible?
> `optional` **on\_first\_visible**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md)
#### Defined in
[src/parser/classes/misc/CommandContext.ts:13](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/misc/CommandContext.ts#L13)
***
### on\_focus?
> `optional` **on\_focus**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md)
#### Defined in
[src/parser/classes/misc/CommandContext.ts:5](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/misc/CommandContext.ts#L5)
***
### on\_hidden?
> `optional` **on\_hidden**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md)
#### Defined in
[src/parser/classes/misc/CommandContext.ts:6](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/misc/CommandContext.ts#L6)
***
### on\_hover?
> `optional` **on\_hover**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md)
#### Defined in
[src/parser/classes/misc/CommandContext.ts:14](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/misc/CommandContext.ts#L14)
***
### on\_long\_press?
> `optional` **on\_long\_press**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md)
#### Defined in
[src/parser/classes/misc/CommandContext.ts:9](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/misc/CommandContext.ts#L9)
***
### on\_tap?
> `optional` **on\_tap**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md)
#### Defined in
[src/parser/classes/misc/CommandContext.ts:10](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/misc/CommandContext.ts#L10)
***
### on\_touch\_end?
> `optional` **on\_touch\_end**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md)
#### Defined in
[src/parser/classes/misc/CommandContext.ts:7](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/misc/CommandContext.ts#L7)
***
### on\_touch\_move?
> `optional` **on\_touch\_move**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md)
#### Defined in
[src/parser/classes/misc/CommandContext.ts:8](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/misc/CommandContext.ts#L8)
***
### on\_touch\_start?
> `optional` **on\_touch\_start**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md)
#### Defined in
[src/parser/classes/misc/CommandContext.ts:11](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/misc/CommandContext.ts#L11)
***
### on\_visible?
> `optional` **on\_visible**: [`NavigationEndpoint`](../../YTNodes/classes/NavigationEndpoint.md)
#### Defined in
[src/parser/classes/misc/CommandContext.ts:12](https://github.com/LuanRT/YouTube.js/blob/af92984523f90200a18314b94478a2697c9deab0/src/parser/classes/misc/CommandContext.ts#L12)