UNPKG

@duell10111/youtubei.js

Version:

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

38 lines (37 loc) 1.66 kB
import { MediaInfo } from '../../core/mixins/index.js'; import type ChipCloud from '../classes/ChipCloud.js'; import type MerchandiseShelf from '../classes/MerchandiseShelf.js'; import PlayerOverlay from '../classes/PlayerOverlay.js'; import type VideoSecondaryInfo from '../classes/VideoSecondaryInfo.js'; import NavigationEndpoint from '../classes/NavigationEndpoint.js'; import type { Actions, ApiResponse } from '../../core/index.js'; import type { ObservedArray, YTNode } from '../helpers.js'; import SingleColumnWatchNextResults from '../classes/SingleColumnWatchNextResults.js'; import VideoMetadata from '../classes/VideoMetadata.js'; export default class VideoInfo extends MediaInfo { primary_info?: VideoMetadata | null; secondary_info?: VideoSecondaryInfo | null; playlist?: SingleColumnWatchNextResults['playlist']; merchandise?: MerchandiseShelf | null; related_chip_cloud?: ChipCloud | null; watch_next_feed?: ObservedArray<YTNode> | null; player_overlays?: PlayerOverlay | null; autoplay?: SingleColumnWatchNextResults['autoplay']['autoplay']; constructor(data: [ApiResponse, ApiResponse?], actions: Actions, cpn: string); /** * Adds video to the watch history. */ addToWatchHistory(): Promise<Response>; /** * Updates video in the watch history with specific point (after being added to watch history). */ updateWatchTime(playedSeconds?: number): Promise<Response>; /** * Likes the video. */ like(): Promise<ApiResponse>; /** * Gets the endpoint of the autoplay video */ get autoplay_video_endpoint(): NavigationEndpoint | null; }