youtubei.js / Helpers / YTNode
Class: YTNode
Extended by
ChildElement
AboutChannel
AboutChannelView
AccountChannel
AccountItem
AccountItemSection
AccountItemSectionHeader
AccountSectionList
AppendContinuationItemsAction
GetMultiPageMenuAction
OpenPopupAction
UpdateEngagementPanelAction
Alert
AlertWithButton
AnalyticsMainAppKeyMetrics
AnalyticsRoot
AnalyticsShortsCarouselCard
AnalyticsVideo
AnalyticsVodCarouselCard
CtaGoToCreatorStudio
DataModelSection
StatRow
AttributionView
AudioOnlyPlayability
AutomixPreviewVideo
AvatarView
BackstageImage
BackstagePost
BackstagePostThread
BadgeView
BrowseFeedActions
BrowserMediaSession
Button
ButtonView
C4TabbedHeader
CallToActionButton
Card
CardCollection
CarouselHeader
CarouselItem
CarouselLockup
Channel
ChannelAboutFullMetadata
ChannelAgeGate
ChannelExternalLinkView
ChannelFeaturedContent
ChannelHeaderLinks
ChannelHeaderLinksView
ChannelMetadata
ChannelMobileHeader
ChannelOptions
ChannelOwnerEmptyState
ChannelSubMenu
ChannelTagline
ChannelThumbnailWithLink
ChannelVideoPlayer
Chapter
ChildVideo
ChipBarView
ChipCloud
ChipCloudChip
ChipView
ClipAdState
ClipCreation
ClipCreationScrubber
ClipCreationTextInput
ClipSection
CollaboratorInfoCardContent
CollageHeroImage
CollectionThumbnailView
AuthorCommentBadge
Comment
CommentActionButtons
CommentDialog
CommentReplies
CommentReplyDialog
CommentsEntryPointHeader
CommentsEntryPointTeaser
CommentsHeader
CommentSimplebox
CommentsSimplebox
CommentThread
CommentView
CreatorHeart
EmojiPicker
PdgCommentChip
SponsorCommentBadge
CompactChannel
CompactLink
CompactMovie
CompactStation
CompactVideo
ConfirmDialog
ContentMetadataView
ContentPreviewImageView
ContinuationItem
ConversationBar
CopyLink
CreatePlaylistDialog
DecoratedAvatarView
DecoratedPlayerBar
DefaultPromoPanel
DescriptionPreviewView
DidYouMean
DislikeButtonView
DownloadButton
Dropdown
DropdownItem
DynamicTextView
Element
EmergencyOnebox
EmojiPickerCategory
EmojiPickerCategoryButton
EmojiPickerUpsellCategory
Endscreen
EndscreenElement
EndScreenPlaylist
EndScreenVideo
EngagementPanelSectionList
EngagementPanelTitleHeader
EomSettingsDisclaimer
ExpandableMetadata
ExpandableTab
ExpandableVideoDescriptionBody
ExpandedShelfContents
Factoid
FancyDismissibleDialog
FeedFilterChipBar
FeedNudge
FeedTabbedHeader
FlexibleActionsView
GameCard
GameDetails
Grid
GridChannel
GridHeader
GridMix
GridMovie
GridPlaylist
GridShow
GridVideo
GuideCollapsibleEntry
GuideCollapsibleSectionEntry
GuideEntry
GuideSection
HashtagHeader
HashtagTile
Heatmap
HeatMarker
HeroPlaylistThumbnail
HighlightsCarousel
HorizontalCardList
HorizontalList
HorizontalMovieList
IconLink
ImageBannerView
IncludingResultsFor
InfoPanelContainer
InfoPanelContent
InfoRow
InteractiveTabbedHeader
ItemSection
ItemSectionHeader
ItemSectionTab
ItemSectionTabbedHeader
LikeButton
LikeButtonView
LiveChat
AddBannerToLiveChatCommand
AddChatItemAction
AddLiveChatTickerItemAction
DimChatItemAction
LiveChatAutoModMessage
LiveChatBanner
LiveChatBannerHeader
LiveChatBannerPoll
LiveChatMembershipItem
LiveChatPaidMessage
LiveChatPaidSticker
LiveChatPlaceholderItem
LiveChatProductItem
LiveChatRestrictedParticipation
LiveChatTickerPaidMessageItem
LiveChatTickerSponsorItem
PollHeader
LiveChatActionPanel
MarkChatItemAsDeletedAction
MarkChatItemsByAuthorAsDeletedAction
RemoveBannerForLiveChatCommand
RemoveChatItemAction
RemoveChatItemByAuthorAction
ReplaceChatItemAction
ReplayChatItemAction
ShowLiveChatActionPanelAction
ShowLiveChatDialogAction
ShowLiveChatTooltipCommand
UpdateDateTextAction
UpdateDescriptionAction
UpdateLiveChatPollAction
UpdateTitleAction
UpdateToggleButtonTextAction
UpdateViewershipAction
LiveChatDialog
LiveChatHeader
LiveChatItemList
LiveChatMessageInput
LiveChatParticipant
LiveChatParticipantsList
LockupMetadataView
LockupView
MacroMarkersInfoItem
MacroMarkersList
MacroMarkersListItem
Menu
MenuPopup
MenuServiceItemDownload
MultiPageMenu
MultiPageMenuNotificationSection
MusicMenuItemDivider
MusicMultiSelectMenu
MusicMultiSelectMenuItem
SimpleMenuHeader
MerchandiseItem
MerchandiseShelf
Message
MetadataBadge
MetadataRow
MetadataRowContainer
MetadataRowHeader
MetadataScreen
MicroformatData
ModalWithTitleAndButton
Movie
MovingThumbnail
MultiMarkersPlayerBar
MusicCardShelf
MusicCardShelfHeaderBasic
MusicCarouselShelf
MusicCarouselShelfBasicHeader
MusicDescriptionShelf
MusicDetailHeader
MusicDownloadStateBadge
MusicEditablePlaylistDetailHeader
MusicElementHeader
MusicHeader
MusicImmersiveHeader
MusicInlineBadge
MusicItemThumbnailOverlay
MusicLargeCardItemCarousel
MusicMultiRowListItem
MusicNavigationButton
MusicPlayButton
MusicPlaylistEditHeader
MusicPlaylistShelf
MusicQueue
MusicResponsiveHeader
MusicResponsiveListItem
MusicResponsiveListItemFixedColumn
MusicResponsiveListItemFlexColumn
MusicShelf
MusicSideAlignedItem
MusicSortFilterButton
MusicTastebuilderShelf
MusicTastebuilderShelfThumbnail
MusicThumbnail
MusicTwoRowItem
MusicVisualHeader
NavigationEndpoint
Notification
PageHeader
PageHeaderView
PageIntroduction
PivotButton
PlayerAnnotationsExpanded
PlayerCaptionsTracklist
PlayerControlsOverlay
PlayerErrorMessage
PlayerLegacyDesktopYpcOffer
PlayerLegacyDesktopYpcTrailer
PlayerLiveStoryboardSpec
PlayerMicroformat
PlayerOverflow
PlayerOverlay
PlayerOverlayAutoplay
PlayerStoryboardSpec
Playlist
PlaylistCustomThumbnail
PlaylistHeader
PlaylistInfoCardContent
PlaylistMetadata
PlaylistPanel
PlaylistPanelVideo
PlaylistPanelVideoWrapper
PlaylistSidebar
PlaylistSidebarPrimaryInfo
PlaylistSidebarSecondaryInfo
PlaylistVideo
PlaylistVideoList
PlaylistVideoThumbnail
Poll
PostMultiImage
ProductList
ProductListHeader
ProductListItem
ProfileColumn
ProfileColumnStats
ProfileColumnStatsEntry
ProfileColumnUserInfo
Quiz
RecognitionShelf
ReelItem
ReelPlayerHeader
ReelPlayerOverlay
ReelShelf
RelatedChipCloud
RichGrid
RichItem
RichListHeader
RichMetadata
RichMetadataRow
RichSection
RichShelf
SearchBox
SearchFilter
SearchFilterGroup
SearchFilterOptionsDialog
SearchHeader
SearchRefinementCard
SearchSubMenu
SearchSuggestion
SearchSuggestionsSection
SecondarySearchContainer
SectionList
SegmentedLikeDislikeButton
SegmentedLikeDislikeButtonView
SettingBoolean
SettingsCheckbox
SettingsOptions
SettingsSidebar
SettingsSwitch
SharedPost
Shelf
ShortsLockupView
ShowCustomThumbnail
ShowingResultsFor
SimpleCardContent
SimpleCardTeaser
SimpleTextSection
SingleActionEmergencySupport
SingleColumnBrowseResults
SingleColumnMusicWatchNextResults
SingleHeroImage
SlimOwner
SlimVideoMetadata
SortFilterHeader
SortFilterSubMenu
StructuredDescriptionContent
StructuredDescriptionPlaylistLockup
SubFeedOption
SubFeedSelector
SubscribeButton
SubscriptionNotificationToggleButton
Tab
Tabbed
TabbedSearchResults
TextHeader
ThumbnailBadgeView
ThumbnailHoverOverlayView
ThumbnailLandscapePortrait
ThumbnailOverlayBadgeView
ThumbnailOverlayBottomPanel
ThumbnailOverlayEndorsement
ThumbnailOverlayHoverText
ThumbnailOverlayInlineUnplayable
ThumbnailOverlayLoadingPreview
ThumbnailOverlayNowPlaying
ThumbnailOverlayPinking
ThumbnailOverlayPlaybackStatus
ThumbnailOverlayResumePlayback
ThumbnailOverlaySidePanel
ThumbnailOverlayTimeStatus
ThumbnailOverlayToggleButton
ThumbnailView
TimedMarkerDecoration
TitleAndButtonListHeader
ToggleButton
ToggleButtonView
ToggleMenuServiceItem
Tooltip
TopicChannelDetails
Transcript
TranscriptFooter
TranscriptSearchBox
TranscriptSearchPanel
TranscriptSectionHeader
TranscriptSegment
TranscriptSegmentList
TwoColumnBrowseResults
TwoColumnSearchResults
TwoColumnWatchNextResults
UniversalWatchCard
UploadTimeFactoid
UpsellDialog
VerticalList
VerticalWatchCardList
Video
VideoAttributesSectionView
VideoAttributeView
VideoDescriptionCourseSection
VideoDescriptionHeader
VideoDescriptionInfocardsSection
VideoDescriptionMusicSection
VideoDescriptionTranscriptSection
VideoInfoCardContent
VideoOwner
VideoPrimaryInfo
VideoSecondaryInfo
ViewCountFactoid
WatchCardCompactVideo
WatchCardHeroVideo
WatchCardRichHeader
WatchCardSectionSequence
WatchNextEndScreen
YpcTrailer
AnchoredSection
KidsBlocklistPicker
KidsBlocklistPickerItem
KidsCategoriesHeader
KidsCategoryTab
KidsHomeScreen
ItemSectionContinuation
NavigateAction
ShowMiniplayerCommand
ReloadContinuationItemsCommand
SectionListContinuation
MusicPlaylistShelfContinuation
MusicShelfContinuation
GridContinuation
PlaylistPanelContinuation
Continuation
LiveChatContinuation
ContinuationCommand
Constructors
new YTNode()
new YTNode():
YTNode
Returns
Defined in
Properties
type
readonly
type:string
Defined in
type
readonly
static
type:string
='YTNode'
Defined in
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
]>
Defined in
hasKey()
hasKey<
T
,R
>(key
):this is YTNode & { [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 YTNode & { [k in string]: R }
Whether the node has the key
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
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