Files
YouTube.js/docs/API/kids.md
LuanRT d6c5a9b971 feat: improve support for dubbed content (#293)
* feat(Format): add `language`, `is_dubbed` and `is_original`

* feat: add a format filtering option to the DASH function
> And a simple language option to VideoInfo's download method.

* chore: update docs

* feat: improve audio track info parsing

* feat(Format): parse `audioTrack` prop
2023-01-27 00:42:20 -03:00

2.3 KiB

YouTube Kids

YouTube Kids is a modified version of the YouTube app, with a simplified interface and curated content. This class allows you to interact with its API.

API

search(query)

Searches the given query on YouTube Kids.

Returns: Promise.<Search>

Param Type Description
query string The query to search
Methods & Getters

  • <search>#page
    • Returns the original InnerTube response(s), parsed and sanitized.

getInfo(video_id)

Retrieves video info.

Returns: Promise.<VideoInfo>

Param Type Description
video_id string The video id
Methods & Getters

  • <info>#toDash(url_transformer?, format_filter?)

    • Generates a DASH manifest from the streaming data.
  • <info>#chooseFormat(options)

    • Selects the format that best matches the given options. This method is used internally by #download.
  • <info>#download(options?)

    • Downloads the video.
  • <info>#addToWatchHistory()

    • Adds the video to the watch history.
  • <info>#page

    • Returns the original InnerTube response(s), parsed and sanitized.

getChannel(channel_id)

Retrieves channel info.

Returns: Promise.<Channel>

Param Type Description
channel_id string The channel id
Methods & Getters

  • <channel>#getContinuation()

    • Retrieves next batch of videos.
  • <channel>#has_continuation

    • Returns whether there are more videos to retrieve.
  • <channel>#page

    • Returns the original InnerTube response(s), parsed and sanitized.

getHomeFeed()

Retrieves the home feed.

Returns: Promise.<HomeFeed>

Methods & Getters

  • <feed>#selectCategoryTab(tab: string | KidsCategoryTab)

    • Selects the given category tab.
  • <feed>#categories

    • Returns available categories.
  • <feed>#page

    • Returns the original InnerTube response(s), parsed and sanitized.