mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-18 03:59:38 +00:00
* tests: improve coverage * refactor: clean up nodes * chore: lint * feat(parser): ignore `BrandVideoShelf` Seems to be used for ads. * feat(parser): ignore `BrandVideoSingleton` too
21 lines
711 B
TypeScript
21 lines
711 B
TypeScript
import NavigationEndpoint from './NavigationEndpoint.js';
|
|
import Thumbnail from './misc/Thumbnail.js';
|
|
import { YTNode } from '../helpers.js';
|
|
import type { RawNode } from '../index.js';
|
|
|
|
export default class CollageHeroImage extends YTNode {
|
|
static type = 'CollageHeroImage';
|
|
|
|
left: Thumbnail[];
|
|
top_right: Thumbnail[];
|
|
bottom_right: Thumbnail[];
|
|
endpoint: NavigationEndpoint;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
this.left = Thumbnail.fromResponse(data.leftThumbnail);
|
|
this.top_right = Thumbnail.fromResponse(data.topRightThumbnail);
|
|
this.bottom_right = Thumbnail.fromResponse(data.bottomRightThumbnail);
|
|
this.endpoint = new NavigationEndpoint(data.navigationEndpoint);
|
|
}
|
|
} |