feat(parser): Add AnimatedThumbnailOverlayView (#903)

* Add AnimatedThumbnailOverlayView parser.

* Update nodes.ts
This commit is contained in:
Izak Filmalter
2025-02-17 06:41:17 -08:00
committed by GitHub
parent 5394edc9bd
commit 0cb92d9620
4 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
import { YTNode } from '../helpers.js';
import type { RawNode } from '../types/index.js';
export default class AnimatedThumbnailOverlayView extends YTNode {
static type = 'AnimatedThumbnailOverlayView';
thumbnail: {
sources: {
url: string,
width: number,
height: number
}[]
};
constructor(data: RawNode) {
super();
this.thumbnail = {
sources: data.thumbnail.sources.map((item: any) => ({
url: item.url,
width: item.width,
height: item.height
}))
};
}
}