feat: add support for chapters & video heatmap (#263)

* feat: add support for chapters & video heatmap

* chore: add tests
This commit is contained in:
LuanRT
2022-12-27 04:17:05 -03:00
committed by GitHub
parent 2b3642ba63
commit 6a4b4f3359
9 changed files with 183 additions and 4 deletions

View File

@@ -0,0 +1,21 @@
import Text from './misc/Text';
import Thumbnail from './misc/Thumbnail';
import { YTNode } from '../helpers';
class Chapter extends YTNode {
static type = 'Chapter';
title: Text;
time_range_start_millis: number;
thumbnail: Thumbnail[];
constructor(data: any) {
super();
this.title = new Text(data.title);
this.time_range_start_millis = data.timeRangeStartMillis;
this.thumbnail = Thumbnail.fromResponse(data.thumbnail);
}
}
export default Chapter;