Files
YouTube.js/src/parser/classes/WatchCardHeroVideo.ts
2022-11-30 19:02:49 -03:00

22 lines
655 B
TypeScript

import Parser from '../index';
import NavigationEndpoint from './NavigationEndpoint';
import { YTNode } from '../helpers';
class WatchCardHeroVideo extends YTNode {
static type = 'WatchCardHeroVideo';
endpoint: NavigationEndpoint;
call_to_action_button;
hero_image;
label: string;
constructor(data: any) {
super();
this.endpoint = new NavigationEndpoint(data.navigationEndpoint);
this.call_to_action_button = Parser.parseItem(data.callToActionButton);
this.hero_image = Parser.parseItem(data.heroImage);
this.label = data.lengthText?.accessibility.accessibilityData.label || '';
}
}
export default WatchCardHeroVideo;