Commit 7c0e7df
docs: rewrite README for integrators; add LICENSE file
Reorganized the README around what someone actually needs to read when
deciding whether and how to use this library:
- Lead with a working code sample showing the output shape — the first
10 lines now answer "what does this do" with real data.
- New `Languages` section explaining track-selection precedence (manual
> auto-generated > languageCode match > partial > first available),
so integrators know what `lang: 'en'` actually does when there's no
English track.
- New `Error handling` section documenting the parseable error message
format the library throws ("Video not playable on any client.
Attempts: <client>: <STATUS> - <reason>") with a worked classifier
example.
- Modernized Next.js example from Pages Router to App Router.
- Added Express and Cloudflare Workers examples (the Workers one shows
proxy wiring, since Workers always need it).
- Moved changelog to the bottom and pruned stale entries — the v1.8.1
claim of "Bot Detection Bypass" and "Enhanced Serverless Support"
was contradicted by v1.10.0's reality (datacenter IPs are filtered
by YouTube and no client trick bypasses that), so it stays cut.
- Fixed the license mismatch: README previously said "ISC" while
package.json declared MIT.
Also added the missing LICENSE file (MIT). npm auto-includes it in the
published tarball; published package is now 5 files (LICENSE + README +
package.json + dist/index.js + dist/index.d.ts) at 23.8 KB unpacked.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 66f1129 commit 7c0e7df
2 files changed
Lines changed: 250 additions & 188 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments