youtubei.js / YT / VideoInfo
Class: VideoInfo
Defined in: src/parser/youtube/VideoInfo.ts:39
Extends
Constructors
Constructor
new VideoInfo(
data,actions,cpn):VideoInfo
Defined in: src/parser/youtube/VideoInfo.ts:56
Parameters
data
actions
cpn
string
Returns
VideoInfo
Overrides
Properties
annotations?
optionalannotations?:ObservedArray<PlayerAnnotationsExpanded>
Defined in: src/core/mixins/MediaInfo.ts:40
Inherited from
autoplay?
optionalautoplay?:object
Defined in: src/parser/youtube/VideoInfo.ts:50
count_down_secs?
optionalcount_down_secs?:number
modified_sets?
optionalmodified_sets?:AutoplaySet[]
sets
sets:
AutoplaySet[]
basic_info
basic_info:
object
Defined in: src/core/mixins/MediaInfo.ts:39
allow_ratings?
optionalallow_ratings?:boolean
author?
optionalauthor?:string
category
category:
string|null
channel
channel: {
id:string;name:string;url:string; } |null
channel_id?
optionalchannel_id?:string
duration?
optionalduration?:number
embed
embed: {
flash_secure_url:string;flash_url:string;height:any;iframe_url:string;width:any; } |null|undefined
end_timestamp
end_timestamp:
Date|null
has_ypc_metadata
has_ypc_metadata:
boolean|null
id?
optionalid?:string
is_crawlable?
optionalis_crawlable?:boolean
is_disliked
is_disliked:
boolean|undefined
is_family_safe
is_family_safe:
boolean|undefined=info.microformat.is_family_safe
is_liked
is_liked:
boolean|undefined
is_live?
optionalis_live?:boolean
is_live_content?
optionalis_live_content?:boolean
is_live_dvr_enabled?
optionalis_live_dvr_enabled?:boolean
is_low_latency_live_stream?
optionalis_low_latency_live_stream?:boolean
is_owner_viewing?
optionalis_owner_viewing?:boolean
is_post_live_dvr?
optionalis_post_live_dvr?:boolean
is_private?
optionalis_private?:boolean
is_unlisted
is_unlisted:
boolean|undefined=info.microformat.is_unlisted
is_upcoming?
optionalis_upcoming?:boolean
keywords?
optionalkeywords?:string[]
like_count
like_count:
number|undefined
live_chunk_readahead?
optionallive_chunk_readahead?:number
publish_date
publish_date:
string|null
short_description?
optionalshort_description?:string
start_timestamp
start_timestamp:
Date|null
tags
tags:
string[] |null
thumbnail?
optionalthumbnail?:Thumbnail[]
title?
optionaltitle?:string
upload_date
upload_date:
string|null
url_canonical
url_canonical:
string|null
view_count
view_count:
number|undefined
Inherited from
captions?
optionalcaptions?:PlayerCaptionsTracklist
Defined in: src/core/mixins/MediaInfo.ts:43
Inherited from
cards?
optionalcards?:CardCollection
Defined in: src/core/mixins/MediaInfo.ts:44
Inherited from
comments_entry_point_header?
optionalcomments_entry_point_header?:CommentsEntryPointHeader|null
Defined in: src/parser/youtube/VideoInfo.ts:48
endscreen?
optionalendscreen?:Endscreen
Defined in: src/core/mixins/MediaInfo.ts:42
Inherited from
engagement_panels?
optionalengagement_panels?:ObservedArray<EngagementPanelSectionList>
Defined in: src/parser/youtube/VideoInfo.ts:52
game_info?
optionalgame_info?:object
Defined in: src/parser/youtube/VideoInfo.ts:43
release_year
release_year:
Text|undefined
title
title:
Text|undefined
heat_map?
optionalheat_map?:Heatmap|null
Defined in: src/parser/youtube/VideoInfo.ts:51
livechat?
optionallivechat?:LiveChat|null
Defined in: src/parser/youtube/VideoInfo.ts:49
merchandise?
optionalmerchandise?:MerchandiseShelf|null
Defined in: src/parser/youtube/VideoInfo.ts:44
playability_status?
optionalplayability_status?:IPlayabilityStatus
Defined in: src/core/mixins/MediaInfo.ts:46
Inherited from
player_config?
optionalplayer_config?:IPlayerConfig
Defined in: src/core/mixins/MediaInfo.ts:47
Inherited from
player_overlays?
optionalplayer_overlays?:PlayerOverlay|null
Defined in: src/parser/youtube/VideoInfo.ts:47
playlist?
optionalplaylist?:object
Defined in: src/parser/youtube/VideoInfo.ts:42
author
contents
contents:
ObservedArray<YTNode>
current_index
current_index:
number
id
id:
string
is_infinite
is_infinite:
boolean
menu
menu:
Menu|null
title
title:
string
primary_info?
optionalprimary_info?:VideoPrimaryInfo|null
Defined in: src/parser/youtube/VideoInfo.ts:40
related_chip_cloud?
optionalrelated_chip_cloud?:ChipCloud|null
Defined in: src/parser/youtube/VideoInfo.ts:45
secondary_info?
optionalsecondary_info?:VideoSecondaryInfo|null
Defined in: src/parser/youtube/VideoInfo.ts:41
storyboards?
optionalstoryboards?:PlayerStoryboardSpec|PlayerLiveStoryboardSpec
Defined in: src/core/mixins/MediaInfo.ts:41
Inherited from
ShortFormVideoInfo.storyboards
streaming_data?
optionalstreaming_data?:IStreamingData
Defined in: src/core/mixins/MediaInfo.ts:45
Inherited from
watch_next_feed?
optionalwatch_next_feed?:ObservedArray<YTNode> |null
Defined in: src/parser/youtube/VideoInfo.ts:46
Accessors
actions
Get Signature
get actions():
Actions
Defined in: src/core/mixins/MediaInfo.ts:249
Returns
Inherited from
autoplay_video_endpoint
Get Signature
get autoplay_video_endpoint():
NavigationEndpoint|null
Defined in: src/parser/youtube/VideoInfo.ts:413
Gets the endpoint of the autoplay video
Returns
NavigationEndpoint | null
cpn
Get Signature
get cpn():
string
Defined in: src/core/mixins/MediaInfo.ts:256
Content Playback Nonce.
Returns
string
Inherited from
filters
Get Signature
get filters():
string[]
Defined in: src/parser/youtube/VideoInfo.ts:399
Watch next feed filters.
Returns
string[]
has_trailer
Get Signature
get has_trailer():
boolean
Defined in: src/parser/youtube/VideoInfo.ts:420
Checks if trailer is available.
Returns
boolean
music_tracks
Get Signature
get music_tracks():
object[]
Defined in: src/parser/youtube/VideoInfo.ts:427
Get songs used in the video.
Returns
object[]
page
Get Signature
get page(): [
IPlayerResponse,INextResponse?]
Defined in: src/core/mixins/MediaInfo.ts:263
Parsed InnerTube response.
Returns
[IPlayerResponse, INextResponse?]
Inherited from
wn_has_continuation
Get Signature
get wn_has_continuation():
boolean
Defined in: src/parser/youtube/VideoInfo.ts:406
Checks if continuation is available for the watch next feed.
Returns
boolean
Methods
addToWatchHistory()
addToWatchHistory():
Promise<Response>
Defined in: src/parser/youtube/VideoInfo.ts:198
Adds video to the watch history.
Returns
Promise<Response>
Overrides
chooseFormat()
chooseFormat(
options):Format
Defined in: src/core/mixins/MediaInfo.ts:163
Selects the format that best matches the given options.
Parameters
options
Options
Returns
Inherited from
dislike()
dislike():
Promise<ApiResponse>
Defined in: src/parser/youtube/VideoInfo.ts:275
Dislikes the video.
Returns
Promise<ApiResponse>
download()
download(
options?):Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>
Defined in: src/core/mixins/MediaInfo.ts:171
Downloads the video.
Parameters
options?
DownloadOptions = {}
Download options.
Returns
Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>
Inherited from
getLiveChat()
getLiveChat():
LiveChat
Defined in: src/parser/youtube/VideoInfo.ts:370
Retrieves Live Chat if available.
Returns
getStreamingInfo()
getStreamingInfo(
url_transformer?,format_filter?):Promise<StreamingInfo>
Defined in: src/core/mixins/MediaInfo.ts:146
Get a cleaned up representation of the adaptive_formats
Parameters
url_transformer?
format_filter?
Returns
Promise<StreamingInfo>
Inherited from
getTrailerInfo()
getTrailerInfo():
VideoInfo|null
Defined in: src/parser/youtube/VideoInfo.ts:380
Retrieves trailer info if available (typically for non-purchased movies or films).
Returns
VideoInfo | null
VideoInfo for the trailer, or null if none.
getTranscript()
getTranscript():
Promise<TranscriptInfo>
Defined in: src/core/mixins/MediaInfo.ts:184
Retrieves the video's transcript.
Returns
Promise<TranscriptInfo>
Inherited from
getWatchNextContinuation()
getWatchNextContinuation():
Promise<VideoInfo>
Defined in: src/parser/youtube/VideoInfo.ts:212
Retrieves watch next feed continuation.
Returns
Promise<VideoInfo>
like()
like():
Promise<ApiResponse>
Defined in: src/parser/youtube/VideoInfo.ts:235
Likes the video.
Returns
Promise<ApiResponse>
removeRating()
removeRating():
Promise<ApiResponse>
Defined in: src/parser/youtube/VideoInfo.ts:315
Removes like/dislike.
Returns
Promise<ApiResponse>
selectFilter()
selectFilter(
target_filter):Promise<VideoInfo>
Defined in: src/parser/youtube/VideoInfo.ts:164
Applies given filter to the watch next feed. Use filters to get available filters.
Parameters
target_filter
string | ChipCloudChip | undefined
Filter to apply.
Returns
Promise<VideoInfo>
toDash()
toDash(
options?):Promise<string>
Defined in: src/core/mixins/MediaInfo.ts:106
Generates a DASH manifest from the streaming data.
Parameters
options?
format_filter?
manifest_options?
DashOptions
url_transformer?
Returns
Promise<string>
DASH manifest
Inherited from
updateWatchTime()
updateWatchTime(
startTime):Promise<Response>
Defined in: src/parser/youtube/VideoInfo.ts:205
Updates watch time for the video.
Parameters
startTime
number
Returns
Promise<Response>