@duell10111/youtubei.js
Version:
A JavaScript client for YouTube's private API, known as InnerTube.
31 lines • 1.47 kB
JavaScript
import { YTNode } from '../helpers.js';
import { Parser } from '../index.js';
import NavigationEndpoint from './NavigationEndpoint.js';
import LikeButton from './LikeButton.js';
import VideoOwner from './VideoOwner.js';
import VideoViewCount from './VideoViewCount.js';
import VideoBadgeView from './VideoBadgeView.js';
import Text from './misc/Text.js';
class VideoMetadata extends YTNode {
constructor(data) {
super();
this.title = new Text(data.title);
this.description = new Text(data.description);
this.allow_ratings = data.allowRatings;
this.date_text = new Text(data.dateText);
this.video_id = data.videoId;
this.like_button = Parser.parseItem(data.likeButton, LikeButton);
this.owner = Parser.parseItem(data.owner, VideoOwner);
this.view_count = Parser.parseItem(data.viewCount, VideoViewCount);
this.is_limited_state = data.isLimitedState;
this.published_time_text = new Text(data.publishedTimeText);
this.may_truncate_channel_name = data.mayTruncateChannelName;
this.accessibility_text = data.accessibilityText;
this.onClickCommand = new NavigationEndpoint(data.onClickCommand);
this.featured_metadata = Parser.parse(data.featuredMetadata, true, VideoBadgeView);
this.education_text = new Text(data.educationText);
}
}
VideoMetadata.type = 'VideoMetadata';
export default VideoMetadata;
//# sourceMappingURL=VideoMetadata.js.map