UNPKG

@duell10111/youtubei.js

Version:

A JavaScript client for YouTube's private API, known as InnerTube.

45 lines 1.74 kB
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'; export default class VideoMetadata extends YTNode { static type = 'VideoMetadata'; title; description; allow_ratings; date_text; video_id; like_button; owner; view_count; is_limited_state; published_time_text; may_truncate_channel_name; accessibility_text; onClickCommand; featured_metadata; education_text; 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); } } //# sourceMappingURL=VideoMetadata.js.map