npm @distube/ytdl-core 5.0.0

latest release: 5.0.1
3 hours ago

Breaking changes

  • build!: require the Node versions jsdom supports (0cfe780)
  • feat!: keep YouTube's format fields and list DRM and OTF formats (2f0bc47)
  • refactor!: make info self-contained and simplify the v5 API (0ebae49)
  • refactor!: remove the 4.x JavaScript implementation (5cb6cff)

Features

  • feat: fail a request that waits longer than timeoutMs (20d4d71)
  • feat: match formats by criteria lists and start SABR downloads at a time (b825a0a)
  • feat: add search, playlists, related videos and suggestions (4cdc304)
  • feat: add caption tracks and getCaptions (c374a31)
  • feat: add the ytdl-core cookies command (01b92bb)
  • feat: add the Ytdl class (da6a3f5)
  • feat: mint PO tokens in a worker (99492d3)
  • feat: stream formats over ranged HTTP, SABR, HLS and DASH (4452978)
  • feat: ask InnerTube clients in priority order and solve signatures locally (2fd416a)
  • feat: parse video IDs, read video info and choose formats (c3ea73f)

Fixes

  • fix: settle a body read when its request aborts (d04cbfa)
  • fix(hls): list a live master's audio renditions as audio-only formats (da409e4)
  • fix(formats): prefer a known bitrate when picking the lowest quality (489e079)
  • fix(sabr): block a client after a 403 on a later SABR resume (25ddb9f)
  • fix: skip a resume client that serves another file under the itag (2a1c901)
  • fix: fill REGION_BLOCKED countries from WEB metadata (ba6d41a)
  • fix: classify TV's upcoming-event and the embed's age-restricted answers (9763759)
  • fix: keep InnerTube's error status and message in the attempt reason (3c9eff7)
  • fix: rank every error code and record each attempt's step and cause (3ebbfd7)
  • fix(solver): report an unreachable player as PLAYER_SOLVE_FAILED (411b004)
  • fix(solver): keep only ECMAScript built-ins in the player context (2f893eb)
  • fix: reject mix playlist IDs and keep curated YouTube Music lists (abc9dda)
  • fix: page through playlists of up to 1 000 pages (36361f6)
  • fix: mark live search results that carry no LIVE badge (00a901b)
  • fix: fall back to DRC and dubbed copies in chooseFormat (a8bf7c6)
  • fix: keep a live lookup's DASH formats when the HLS master fails (351085c)
  • fix: send the consent cookie on logged-out YouTube requests (cc703e3)
  • fix: end live HLS and DASH after 30 s without a new segment (5f7c5bf)
  • fix: keep time-started SABR reads and resumes on segment starts (c757c13)
  • fix: end unknown-length ranged reads cleanly and skip empty chunks (72d116b)
  • fix: accept a Cookie header with surrounding whitespace (9824e97)
  • fix: redact signed values anywhere in an error's cause (9903b5e)
  • fix: bound, abort and pin the PO token provider's requests (a9b5482)
  • fix: keep player code from reaching the host in the solver (eb5d6da)
  • fix: prefer the original audio track over a dub (0e55392)
  • fix: classify playability from English player answers (528a448)
  • fix: give the PO token worker a browser user agent and consent cookie (1bf857d)
  • fix: resume a failed SABR session at the segment it stopped in (fc523bd)
  • fix: resume media reads after a failed, broken or stalled request (5dc818c)
  • fix: wait at the live DASH head instead of polling it (5bb7a3e)

Refactoring

  • refactor: send one browser user agent outside the client ladder (f84d509)
  • refactor: rename RelatedVideo to VideoSummary (2f8a09e)
  • refactor: move InnerTube parse helpers into json.ts (4d353e6)

Documentation

  • docs: map every 4.x export, option and info field in the migration guide (ff4e441)
  • docs(clients): replace the client tables with measured outcomes (45944ac)
  • docs: cover ESM-only imports, typed proxy fetches and the shared player (3e32e00)
  • docs: download audio in the first example (841cb87)
  • docs: publish guides on distube.js.org (b1fee65)
  • docs: give playlists their own guide (5f23686)
  • docs: add the Starlight documentation site (3b8fb67)
  • docs: rewrite the README and contributing guide (6fb5104)

Tests

  • test(live): solve pinned players against yt-dlp/ejs reference values (207dbdb)
  • test: pin byte accounting, session stops, the block period and expiry (ed2348d)
  • test: fail runaway fakes on a request budget and match clients by name (845ef0e)
  • test: read past the first minute in the live checks (756119c)
  • test: add live checks against real YouTube (2e3202c)

Build and CI

  • ci: publish only from the release commit and create a github release (d174bb3)
  • ci: run the live suite weekly and link only Discord for help (3482cbb)
  • build: export format types, drop source maps, add package metadata (3f08437)
  • ci: publish through npm trusted publishing (2ef6368)
  • build: type-check and emit with tsrs (0f393fe)
  • ci: check that the packed package loads SABR (e97de15)
  • ci: publish to npm from version tags (2961674)
  • ci: run verify and the live checks on GitHub Actions (1d11a13)
  • ci: publish the docs site to the gh-pages branch (8536c78)
  • build: develop with Bun, TypeScript, oxlint and oxfmt (cd5f04c)

Other changes

Don't miss a new ytdl-core release

NewReleases is sending notifications on new releases.