Skip to content

Commit 7c0e7df

Browse files
devhimsclaude
andcommitted
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

File tree

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Himanshu Gupta
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

0 commit comments

Comments
 (0)