import type { ManifestVideo, ManifestVideoVariant } from "../../../manifest"; export type { Extension, Standard } from "../../../manifest"; export interface GetVKVideoParams { access_token: string; owner_id?: number; videos?: string; album_id?: number; count?: number; offset?: number; extended?: boolean; fields?: string; v: number; } export interface FullRequestParams { baseURL: string; requestParams: Omit; } export interface VKVideoLoaderInterface { resolve(arg: Record): Promise>; } export type ExtendedManifestVideoVariant = ManifestVideoVariant & { vkVideoModel?: VideoVideoFull; }; export type ExtendedManifestVideo = Omit & { variants: ExtendedManifestVideoVariant[]; }; /** * video.get * * Returns detailed information about videos. */ export interface VideoGetParams { /** * ID of the user or community that owns the video(s). */ owner_id?: number; group_id?: number; for_user_id?: number; /** * Video IDs, in the following format: "_,_", Use a negative value to designate a community ID. Example: "-4363_136089719,13245770_137352259" */ videos?: string; /** * ID of the album containing the video(s). */ album_id?: number; width?: number; /** * Number of videos to return. */ count?: number; /** * Offset needed to return a specific subset of videos. */ offset?: number; need_privacy?: 0 | 1; need_embed?: 0 | 1; /** * '1' - to return an extended response with additional fields */ extended?: 0 | 1; fields?: string; device_id?: string; ok_session_key?: string; united_video_only?: 0 | 1; ok_client_params?: string; } export interface VideoGetResponse { /** * Total number */ [key: string]: unknown; count: number; items: VideoVideoFull; } export interface VideoVideoFull { [key: string]: any; /** * List of video episodes with timecodes */ episodes?: VideoEpisode[]; qualities_info?: VideoQualityInfo[]; /** * Video duration in seconds */ duration?: number; image?: VideoVideoImage[]; first_frame?: VideoVideoImage[]; files?: VideoVideoFiles; trailer?: VideoVideoFiles; timeline_thumbs?: VideoTimelineThumbs; } export interface VideoVideoFiles { /** * URL of the external player */ external?: string; /** * URL of the mpeg4 file with 144p quality */ mp4_144?: string; /** * URL of the mpeg4 file with 240p quality */ mp4_240?: string; /** * URL of the mpeg4 file with 360p quality */ mp4_360?: string; /** * URL of the mpeg4 file with 480p quality */ mp4_480?: string; /** * URL of the mpeg4 file with 720p quality */ mp4_720?: string; /** * URL of the mpeg4 file with 1080p quality */ mp4_1080?: string; /** * URL of the mpeg4 file with 2K quality */ mp4_1440?: string; /** * URL of the mpeg4 file with 4K quality */ mp4_2160?: string; /** * URL of the flv file with 320p quality */ flv_320?: string; /** * Instant streaming mp4 URL */ src?: string; /** * Live stream URL */ live?: string; /** * HLS playlist URL */ hls?: string; /** * RTMP stream URL */ rtmp?: string; /** * OKMP RTMP stream URL */ okmp_rtmp?: string; /** * WebSocket stream URL */ ws?: string; /** * CMAF stream URL */ cmaf?: string; /** * DASH manifest URL */ dash_uni?: string; /** * Separated DASH manifest URL */ dash_sep?: string; /** * VP9 DASH manifest URL */ dash_webm?: string; /** * HEVC DASH manifest URL */ dash_hevc?: string; /** * VP9 DASH manifest URL live */ dash_webm_live?: string; /** * HLS live playback URL */ hls_live_playback?: string; /** * DASH live playback URL */ dash_live_playback?: string; /** * HLS ondemand URL */ hls_ondemand?: string; /** * DASH ondemand URL */ dash_ondemand?: string; /** * Failover host */ failover_host?: string; /** * UV migration location info */ united_migration_location?: string; /** * UV migration video size in location */ united_migration_size?: number; } export interface VideoQualityInfo { /** * Size of video: 144, 240, 360 and etc */ quality?: number; /** * List of quality features */ params?: Array<"neurohd">; } export interface VideoEpisode { /** * Seconds from start of the video */ time?: number; /** * Description of episode */ text?: string; } export interface VideoTimelineThumbs { count_per_image?: number; count_per_row?: number; count_total?: number; frame_height?: number; frame_width?: number; links?: string[]; is_uv?: boolean; frequency?: number; } export interface VideoVideoImage { id?: string; /** * Image url */ url: string; /** * Image width */ width: number; /** * Image height */ height: number; theme?: "light" | "dark"; with_padding?: 1; }