Files
YouTube.js/src/parser/classes/HeatMarker.ts
Suhun Han 876e94ad03 feat(VideoInfo): implement MacroMarkersListEntity parser for heatmap (#973)
* refactor(video-info): rewrite heat-map extraction

* fix(parser): Ensure heatmap mutations are processed only if mutations exist

---------

Co-authored-by: Luan <luan.lrt4@gmail.com>
2025-06-08 07:32:50 -03:00

17 lines
565 B
TypeScript

import { YTNode } from '../helpers.js';
import type { RawNode } from '../index.js';
export default class HeatMarker extends YTNode {
static type = 'HeatMarker';
time_range_start_millis: number;
marker_duration_millis: number;
heat_marker_intensity_score_normalized: number;
constructor(data: RawNode) {
super();
this.time_range_start_millis = Number.parseInt(data.startMillis, 10);
this.marker_duration_millis = Number.parseInt(data.durationMillis, 10);
this.heat_marker_intensity_score_normalized = data.intensityScoreNormalized;
}
}