youtubei.js / YTNodes / VideoCard
Class: VideoCard
Extends
Constructors
new VideoCard()
new VideoCard(
data
):VideoCard
Parameters
• data: RawNode
Returns
Overrides
Defined in
src/parser/classes/VideoCard.ts:7
Properties
author
author:
Author
Inherited from
Defined in
src/parser/classes/Video.ts:27
badges
badges:
MetadataBadge
[]
Inherited from
Defined in
src/parser/classes/Video.ts:28
description_snippet?
optional
description_snippet:Text
Inherited from
Defined in
src/parser/classes/Video.ts:18
duration
duration:
object
seconds
seconds:
number
text
text:
string
Inherited from
Defined in
src/parser/classes/Video.ts:34
endpoint
endpoint:
NavigationEndpoint
Inherited from
Defined in
src/parser/classes/Video.ts:29
expandable_metadata
expandable_metadata:
null
|ExpandableMetadata
Inherited from
Defined in
src/parser/classes/Video.ts:23
id
id:
string
Inherited from
Defined in
src/parser/classes/Video.ts:16
is_watched
is_watched:
boolean
Inherited from
Defined in
src/parser/classes/Video.ts:39
menu
menu:
null
|Menu
Inherited from
Defined in
src/parser/classes/Video.ts:40
published
published:
Text
Inherited from
Defined in
src/parser/classes/Video.ts:30
rich_thumbnail?
optional
rich_thumbnail:YTNode
Inherited from
Defined in
src/parser/classes/Video.ts:26
search_video_result_entity_key?
optional
search_video_result_entity_key:string
Inherited from
Video
.search_video_result_entity_key
Defined in
src/parser/classes/Video.ts:41
short_view_count
short_view_count:
Text
Inherited from
Defined in
src/parser/classes/Video.ts:32
show_action_menu
show_action_menu:
boolean
Inherited from
Defined in
src/parser/classes/Video.ts:38
snippets?
optional
snippets:object
[]
Inherited from
Defined in
src/parser/classes/Video.ts:19
thumbnail_overlays
thumbnail_overlays:
ObservedArray
<YTNode
>
Inherited from
Defined in
src/parser/classes/Video.ts:25
thumbnails
thumbnails:
Thumbnail
[]
Inherited from
Defined in
src/parser/classes/Video.ts:24
title
title:
Text
Inherited from
Defined in
src/parser/classes/Video.ts:17
type
readonly
type:string
Inherited from
Defined in
upcoming?
optional
upcoming:Date
Inherited from
Defined in
src/parser/classes/Video.ts:33
view_count
view_count:
Text
Inherited from
Defined in
src/parser/classes/Video.ts:31
type
static
type:string
='VideoCard'
Overrides
Defined in
src/parser/classes/VideoCard.ts:5
Accessors
best_thumbnail
get
best_thumbnail():undefined
|Thumbnail
Returns
undefined
| Thumbnail
Inherited from
Defined in
src/parser/classes/Video.ts:127
description
get
description():string
Returns
string
Inherited from
Defined in
src/parser/classes/Video.ts:96
has_captions
get
has_captions():boolean
Returns
boolean
Inherited from
Defined in
src/parser/classes/Video.ts:123
is_4k
get
is_4k():boolean
Returns
boolean
Inherited from
Defined in
src/parser/classes/Video.ts:119
is_live
get
is_live():boolean
Returns
boolean
Inherited from
Defined in
src/parser/classes/Video.ts:104
is_premiere
get
is_premiere():boolean
Returns
boolean
Inherited from
Defined in
src/parser/classes/Video.ts:115
is_upcoming
get
is_upcoming():undefined
|boolean
Returns
undefined
| boolean
Inherited from
Defined in
src/parser/classes/Video.ts:111
Methods
as()
as<
T
,K
>(...types
):InstanceType
<K
[number
]>
Cast to one of the given types.
Type Parameters
• T extends YTNode
• K extends YTNodeConstructor
<T
>[]
Parameters
• ...types: K
Returns
InstanceType
<K
[number
]>
Inherited from
Defined in
hasKey()
hasKey<
T
,R
>(key
):this is VideoCard & { [k in string]: R }
Check for a key without asserting the type.
Type Parameters
• T extends string
• R = any
Parameters
• key: T
The key to check
Returns
this is VideoCard & { [k in string]: R }
Whether the node has the key
Inherited from
Defined in
is()
is<
T
,K
>(...types
):this is InstanceType<K[number]>
Check if the node is of the given type.
Type Parameters
• T extends YTNode
• K extends YTNodeConstructor
<T
>[]
Parameters
• ...types: K
The type to check
Returns
this is InstanceType<K[number]>
whether the node is of the given type
Inherited from
Defined in
key()
key<
T
,R
>(key
):Maybe
Assert that the node has the given key and return it.
Type Parameters
• T extends string
• R = any
Parameters
• key: T
The key to check
Returns
The value of the key wrapped in a Maybe
Throws
If the node does not have the key