youtubei.js / YTNodes / MusicPlayButton
Class: MusicPlayButton
Defined in: src/parser/classes/MusicPlayButton.ts:6
Extends
Constructors
Constructor
new MusicPlayButton(
data):MusicPlayButton
Defined in: src/parser/classes/MusicPlayButton.ts:16
Parameters
data
Returns
MusicPlayButton
Overrides
Properties
accessibility_pause_data?
optionalaccessibility_pause_data:AccessibilitySupportedDatas
Defined in: src/parser/classes/MusicPlayButton.ts:14
accessibility_play_data?
optionalaccessibility_play_data:AccessibilitySupportedDatas
Defined in: src/parser/classes/MusicPlayButton.ts:13
endpoint
endpoint:
NavigationEndpoint
Defined in: src/parser/classes/MusicPlayButton.ts:9
icon_color
icon_color:
string
Defined in: src/parser/classes/MusicPlayButton.ts:12
pause_icon_type
pause_icon_type:
string
Defined in: src/parser/classes/MusicPlayButton.ts:11
play_icon_type
play_icon_type:
string
Defined in: src/parser/classes/MusicPlayButton.ts:10
type
readonlytype:string
Defined in: src/parser/helpers.ts:8
Inherited from
type
statictype:string='MusicPlayButton'
Defined in: src/parser/classes/MusicPlayButton.ts:7
Overrides
Accessors
pause_label
Get Signature
get pause_label():
string|undefined
Defined in: src/parser/classes/MusicPlayButton.ts:43
Returns
string | undefined
play_label
Get Signature
get play_label():
string|undefined
Defined in: src/parser/classes/MusicPlayButton.ts:39
Returns
string | undefined
Methods
as()
as<
T,K>(...types):InstanceType<K[number]>
Defined in: src/parser/helpers.ts:29
Cast to one of the given types.
Type Parameters
T
T extends YTNode
K
K extends YTNodeConstructor<T>[]
Parameters
types
...K
The types to cast to
Returns
InstanceType<K[number]>
The node cast to one of the given types
Throws
If the node is not of the given type
Inherited from
hasKey()
hasKey<
T,R>(key):this is MusicPlayButton & { [k in string]: R }
Defined in: src/parser/helpers.ts:41
Check for a key without asserting the type.
Type Parameters
T
T extends string
R
R = any
Parameters
key
T
The key to check
Returns
this is MusicPlayButton & { [k in string]: R }
Whether the node has the key
Inherited from
is()
is<
T,K>(...types):this is InstanceType<K[number]>
Defined in: src/parser/helpers.ts:19
Check if the node is of the given type.
Type Parameters
T
T extends YTNode
K
K extends YTNodeConstructor<T>[]
Parameters
types
...K
The type to check
Returns
this is InstanceType<K[number]>
whether the node is of the given type
Inherited from
key()
key<
T,R>(key):Maybe
Defined in: src/parser/helpers.ts:51
Assert that the node has the given key and return it.
Type Parameters
T
T extends string
R
R = any
Parameters
key
T
The key to check
Returns
The value of the key wrapped in a Maybe
Throws
If the node does not have the key