Files
YouTube.js/src/parser/classes/PlayerOverlayAutoplay.js
2022-07-21 03:51:28 -03:00

28 lines
1.0 KiB
JavaScript

import Parser from '../index';
import Text from './misc/Text';
import Author from './misc/Author';
import Thumbnail from './misc/Thumbnail';
import { YTNode } from '../helpers';
class PlayerOverlayAutoplay extends YTNode {
static type = 'PlayerOverlayAutoplay';
constructor(data) {
super();
this.title = new Text(data.title);
this.video_id = data.videoId;
this.video_title = new Text(data.videoTitle);
this.short_view_count = new Text(data.shortViewCountText);
this.prefer_immediate_redirect = data.preferImmediateRedirect;
this.count_down_secs_for_fullscreen = data.countDownSecsForFullscreen;
this.published = new Text(data.publishedTimeText);
this.background = Thumbnail.fromResponse(data.background);
this.thumbnail_overlays = Parser.parse(data.thumbnailOverlays);
this.author = new Author(data.byline);
this.cancel_button = Parser.parse(data.cancelButton);
this.next_button = Parser.parse(data.nextButton);
this.close_button = Parser.parse(data.closeButton);
}
}
export default PlayerOverlayAutoplay;