mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-30 09:55:18 +00:00
feat(parser): Add AnimatedThumbnailOverlayView (#903)
* Add AnimatedThumbnailOverlayView parser. * Update nodes.ts
This commit is contained in:
25
src/parser/classes/AnimatedThumbnailOverlayView.ts
Normal file
25
src/parser/classes/AnimatedThumbnailOverlayView.ts
Normal 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
|
||||
}))
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user