YouTube.js
Guide
Discord
GitHub
Guide
Discord
GitHub

youtubei.js / YTNodes / MacroMarkersListEntity

Class: MacroMarkersListEntity

Represents a list of markers for a video. Can contain different types of markers:

  • MARKER_TYPE_HEATMAP: Heat map markers showing audience engagement data
  • Other marker types may exist but are not currently handled

Extends

  • YTNode

Constructors

new MacroMarkersListEntity()

new MacroMarkersListEntity(data): MacroMarkersListEntity

Parameters

• data: RawNode

Returns

MacroMarkersListEntity

Overrides

YTNode.constructor

Defined in

src/parser/classes/MacroMarkersListEntity.ts:30

Properties

external_video_id

external_video_id: string

Defined in

src/parser/classes/MacroMarkersListEntity.ts:17


marker_entity_key

marker_entity_key: string

Defined in

src/parser/classes/MacroMarkersListEntity.ts:16


marker_type

marker_type: string

The type of markers in this entity (e.g., 'MARKER_TYPE_HEATMAP')

Defined in

src/parser/classes/MacroMarkersListEntity.ts:19


markers

markers: ObservedArray<HeatMarker>

Defined in

src/parser/classes/MacroMarkersListEntity.ts:20


max_height_dp

max_height_dp: number

Defined in

src/parser/classes/MacroMarkersListEntity.ts:21


min_height_dp

min_height_dp: number

Defined in

src/parser/classes/MacroMarkersListEntity.ts:22


show_hide_animation_duration_millis

show_hide_animation_duration_millis: number

Defined in

src/parser/classes/MacroMarkersListEntity.ts:23


timed_marker_decorations

timed_marker_decorations: ObservedArray<TimedMarkerDecoration>

Defined in

src/parser/classes/MacroMarkersListEntity.ts:24


type

readonly type: string

Inherited from

YTNode.type

Defined in

src/parser/helpers.ts:8


type

static type: string = 'MacroMarkersListEntity'

Overrides

YTNode.type

Defined in

src/parser/classes/MacroMarkersListEntity.ts:14

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

YTNode.as

Defined in

src/parser/helpers.ts:29


hasKey()

hasKey<T, R>(key): this is MacroMarkersListEntity & { [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 MacroMarkersListEntity & { [k in string]: R }

Whether the node has the key

Inherited from

YTNode.hasKey

Defined in

src/parser/helpers.ts:41


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

YTNode.is

Defined in

src/parser/helpers.ts:19


isHeatmap()

isHeatmap(): boolean

Checks if this MacroMarkersListEntity represents heatmap data. Only heatmap markers can be converted to Heatmap objects.

Returns

boolean

Defined in

src/parser/classes/MacroMarkersListEntity.ts:65


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

YTNode.key

Defined in

src/parser/helpers.ts:51


toHeatmap()

toHeatmap(): null | Heatmap

Converts this MacroMarkersListEntity to a Heatmap object for compatibility with existing code. Only works for heatmap markers.

Returns

null | Heatmap

Heatmap object if this entity contains heatmap data, null otherwise

Defined in

src/parser/classes/MacroMarkersListEntity.ts:74

Edit this page
Last Updated:: 6/8/25, 5:43 PM
Contributors: Luan