youtubei.js / Helpers / YTNode
Class: YTNode
Extended by
ChildElement
AboutChannel
AboutChannelView
AccountChannel
AccountItem
AccountItemSection
AccountItemSectionHeader
AccountSectionList
AppendContinuationItemsAction
GetMultiPageMenuAction
OpenPopupAction
SendFeedbackAction
SignalAction
UpdateEngagementPanelAction
UpdateSubscribeButtonAction
AddToPlaylist
Alert
AlertWithButton
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
AddToPlaylistCommand
CommandExecutorCommand
ContinuationCommand
GetKidsBlocklistPickerCommand
RunAttestationCommand
ShowDialogCommand
AuthorCommentBadge
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
CreatePlaylistDialogFormView
DecoratedAvatarView
DecoratedPlayerBar
DefaultPromoPanel
DescriptionPreviewView
DialogHeaderView
DialogView
DidYouMean
DislikeButtonView
DownloadButton
Dropdown
DropdownItem
DropdownView
DynamicTextView
Element
EmergencyOnebox
EmojiPickerCategory
EmojiPickerCategoryButton
EmojiPickerUpsellCategory
AddToPlaylistServiceEndpoint
BrowseEndpoint
CreateCommentEndpoint
CreatePlaylistServiceEndpoint
DeletePlaylistEndpoint
FeedbackEndpoint
GetAccountsListInnertubeEndpoint
LikeEndpoint
LiveChatItemContextMenuEndpoint
ModifyChannelNotificationPreferenceEndpoint
PerformCommentActionEndpoint
PlaylistEditEndpoint
ReelWatchEndpoint
SearchEndpoint
ShareEntityServiceEndpoint
SignalServiceEndpoint
SubscribeEndpoint
UnsubscribeEndpoint
WatchEndpoint
WatchNextEndpoint
Endscreen
EndscreenElement
EndScreenPlaylist
EndScreenVideo
EngagementPanelSectionList
EngagementPanelTitleHeader
EomSettingsDisclaimer
ExpandableMetadata
ExpandableTab
ExpandableVideoDescriptionBody
ExpandedShelfContents
Factoid
FancyDismissibleDialog
FeedFilterChipBar
FeedNudge
FeedTabbedHeader
FlexibleActionsView
FormFooterView
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
LiveChatBannerChatSummary
LiveChatBannerHeader
LiveChatBannerPoll
LiveChatBannerRedirect
LiveChatMembershipItem
LiveChatModeChangeMessage
LiveChatPaidMessage
LiveChatPaidSticker
LiveChatPlaceholderItem
LiveChatProductItem
LiveChatRestrictedParticipation
LiveChatSponsorshipsGiftPurchaseAnnouncement
LiveChatSponsorshipsGiftRedemptionAnnouncement
LiveChatSponsorshipsHeader
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
MenuFlexibleItem
MenuPopup
MenuServiceItemDownload
MultiPageMenu
MultiPageMenuNotificationSection
MusicMenuItemDivider
MusicMultiSelectMenu
MusicMultiSelectMenuItem
SimpleMenuHeader
MenuTitle
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
NotificationAction
PageHeader
PageHeaderView
PageIntroduction
PanelFooterView
PivotButton
PlayerAnnotationsExpanded
PlayerCaptionsTracklist
PlayerControlsOverlay
PlayerErrorMessage
PlayerLegacyDesktopYpcOffer
PlayerLegacyDesktopYpcTrailer
PlayerLiveStoryboardSpec
PlayerMicroformat
PlayerOverflow
PlayerOverlay
PlayerOverlayAutoplay
PlayerOverlayVideoDetails
PlayerStoryboardSpec
Playlist
PlaylistAddToOption
PlaylistCustomThumbnail
PlaylistHeader
PlaylistInfoCardContent
PlaylistMetadata
PlaylistPanel
PlaylistPanelVideo
PlaylistPanelVideoWrapper
PlaylistSidebar
PlaylistSidebarPrimaryInfo
PlaylistSidebarSecondaryInfo
PlaylistVideo
PlaylistVideoList
PlaylistVideoThumbnail
Poll
PostMultiImage
PremiereTrailerBadge
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
SharePanelHeader
SharePanelTitleV15
ShareTarget
Shelf
ShortsLockupView
ShowCustomThumbnail
ShowingResultsFor
SimpleCardContent
SimpleCardTeaser
SimpleTextSection
SingleActionEmergencySupport
SingleColumnBrowseResults
SingleColumnMusicWatchNextResults
SingleHeroImage
SlimOwner
SlimVideoMetadata
SortFilterHeader
SortFilterSubMenu
StartAt
StructuredDescriptionContent
StructuredDescriptionPlaylistLockup
SubFeedOption
SubFeedSelector
SubscribeButton
SubscriptionNotificationToggleButton
Tab
Tabbed
TabbedSearchResults
TextFieldView
TextHeader
ThirdPartyShareTargetSection
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
UnifiedSharePanel
UniversalWatchCard
UploadTimeFactoid
UpsellDialog
VerticalList
VerticalWatchCardList
Video
VideoAttributesSectionView
VideoAttributeView
VideoDescriptionCourseSection
VideoDescriptionHeader
VideoDescriptionInfocardsSection
VideoDescriptionMusicSection
VideoDescriptionTranscriptSection
VideoInfoCardContent
VideoOwner
VideoPrimaryInfo
VideoSecondaryInfo
VideoViewCount
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
The types to cast to
Returns
InstanceType
<K
[number
]>
The node cast to one of the given types
Throws
If the node is not of the given type
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