YouTube.js
Guide
Discord
GitHub
Guide
Discord
GitHub

youtubei.js / YTNodes / Mix

Class: Mix

Extends

  • Playlist

Constructors

new Mix()

new Mix(data): Mix

Parameters

• data: RawNode

Returns

Mix

Overrides

Playlist.constructor

Defined in

src/parser/classes/Mix.ts:7

Properties

author

author: Text | Author

Inherited from

Playlist.author

Defined in

src/parser/classes/Playlist.ts:15


badges

badges: ObservedArray<YTNode>

Inherited from

Playlist.badges

Defined in

src/parser/classes/Playlist.ts:23


endpoint

endpoint: NavigationEndpoint

Inherited from

Playlist.endpoint

Defined in

src/parser/classes/Playlist.ts:24


first_videos

first_videos: ObservedArray<YTNode>

Inherited from

Playlist.first_videos

Defined in

src/parser/classes/Playlist.ts:20


id

id: string

Inherited from

Playlist.id

Defined in

src/parser/classes/Playlist.ts:13


menu

menu: YTNode

Inherited from

Playlist.menu

Defined in

src/parser/classes/Playlist.ts:22


share_url

share_url: null | string

Inherited from

Playlist.share_url

Defined in

src/parser/classes/Playlist.ts:21


thumbnail_overlays

thumbnail_overlays: ObservedArray<YTNode>

Inherited from

Playlist.thumbnail_overlays

Defined in

src/parser/classes/Playlist.ts:25


thumbnail_renderer?

optional thumbnail_renderer: PlaylistCustomThumbnail | PlaylistVideoThumbnail

Inherited from

Playlist.thumbnail_renderer

Defined in

src/parser/classes/Playlist.ts:17


thumbnails

thumbnails: Thumbnail[]

Inherited from

Playlist.thumbnails

Defined in

src/parser/classes/Playlist.ts:16


title

title: Text

Inherited from

Playlist.title

Defined in

src/parser/classes/Playlist.ts:14


type

readonly type: string

Inherited from

Playlist.type

Defined in

src/parser/helpers.ts:8


video_count

video_count: Text

Inherited from

Playlist.video_count

Defined in

src/parser/classes/Playlist.ts:18


video_count_short

video_count_short: Text

Inherited from

Playlist.video_count_short

Defined in

src/parser/classes/Playlist.ts:19


view_playlist?

optional view_playlist: Text

Inherited from

Playlist.view_playlist

Defined in

src/parser/classes/Playlist.ts:26


type

static type: string = 'Mix'

Overrides

Playlist.type

Defined in

src/parser/classes/Mix.ts:5

Methods

as()

as<T, K>(...types): InstanceType<K[number]>

Cast to one of the given types.

Type Parameters

• T extends YTNode

• 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

Playlist.as

Defined in

src/parser/helpers.ts:38


hasKey()

hasKey<T, R>(key): this is Mix & { [k in string]: R }

Check for a key without asserting the type.

Type Parameters

• T extends string

• R = any

Parameters

• key: T

The key to check

Returns

this is Mix & { [k in string]: R }

Whether the node has the key

Inherited from

Playlist.hasKey

Defined in

src/parser/helpers.ts:50


is()

is<T, K>(...types): this is InstanceType<K[number]>

Check if the node is of the given type.

Type Parameters

• T extends YTNode

• 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

Playlist.is

Defined in

src/parser/helpers.ts:28


key()

key<T, R>(key): Maybe

Assert that the node has the given key and return it.

Type Parameters

• T extends string

• R = any

Parameters

• key: T

The key to check

Returns

Maybe

The value of the key wrapped in a Maybe

Throws

If the node does not have the key

Inherited from

Playlist.key

Defined in

src/parser/helpers.ts:60

Edit this page
Last Updated:: 3/25/25, 8:08 PM
Contributors: EdamAme-x