extract-youtube 1.0.293 → 1.0.295

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -181,6 +181,11 @@ const api = new YouTubeTranscriptApi({
181
181
  });
182
182
  ```
183
183
 
184
+ See [docs/proxy.md](./docs/proxy.md) for the full guide: generic vs. Webshare
185
+ proxies, the CLI flags, why `proxyConfig` does nothing on Cloudflare
186
+ Workers/edge (and what to use there instead), and caching in front of the
187
+ fetcher so a proxy request is only spent on a video you don't already have.
188
+
184
189
  ## Error Handling
185
190
 
186
191
  ```typescript
@@ -323,7 +328,7 @@ What you get, without wiring any of it up yourself:
323
328
  | **Minimize** | Collapses to the title bar. The iframe is hidden with CSS, never unmounted, so playback isn't interrupted. |
324
329
  | **Picture-in-picture** | Pops the video into an always-on-top OS window via the Document Picture-in-Picture API, where the browser supports it. The node is *moved*, not cloned, so playback continues. |
325
330
  | **Queue** | `addToQueue` / `setQueue` / `playNext`, with an "Up next" strip under the video. |
326
- | **Synced captions** | Optional subtitles panel above the video — the spoken line highlights and auto-scrolls, and clicking a line seeks. Needs `transcriptUrl` or `fetchTranscript` (see below). |
331
+ | **Synced captions** | Optional subtitles panel above the video — caption cues are regrouped into whole sentences (no timestamps), the spoken one highlights and auto-scrolls, and clicking a sentence seeks. Needs `transcriptUrl` or `fetchTranscript` (see below). |
327
332
  | **Resume** | Remembers what was playing, and how far into it, across a reload — plus a per-video position for the last 50 videos, for 24 hours. `storageKey={null}` turns it off. |
328
333
  | **Error recovery** | Reads the IFrame API's error codes, explains them ("this video is private", "the owner doesn't allow embedding"), and offers Retry or Watch on YouTube from the same spot. |
329
334
  | **Theming** | Colours are CSS custom properties on `.eytp-root` and follow `prefers-color-scheme` by default. Override them to match your app. |
@@ -392,7 +397,7 @@ getPlayerState(); // the same, outside React
392
397
  | `fetchTranscript` | `(videoId: string) => Promise<{ snippets, error? }>` | Custom caption loader, instead of `transcriptUrl`. |
393
398
  | `extraControls` | `ReactNode \| (ctx: PlayerControlContext) => ReactNode` | Your own buttons, rendered in the control strip. |
394
399
  | `renderTitle` | `(ctx: PlayerControlContext) => ReactNode` | Custom title-bar content. Defaults to the video title. |
395
- | `showSubtitles` | `boolean` | Force the captions button on or off. Defaults to on when a transcript source is given. |
400
+ | `showSubtitles` | `boolean` | Force the captions button on or off. By default it appears only for videos that turned out to have a transcript — every video played is checked, and one without captions gets no button and no error. |
396
401
  | `showPictureInPicture` | `boolean` | Show the PiP button where supported. Default `true`. |
397
402
  | `storageKey` | `string \| null` | localStorage key for resume-after-reload. `null` disables persistence entirely. |
398
403
  | `className` | `string` | Extra class on the player root, for host-side positioning or theming. |
package/dist/cli.js CHANGED
@@ -2009,7 +2009,7 @@ var package_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
2009
2009
  }), name, version, description, main$1, module$1, types, exports$1, bin, files, scripts, keywords, license, repository, dependencies, peerDependencies, peerDependenciesMeta, devDependencies, engines, package_default;
2010
2010
  var init_package = require_rolldown_runtime.__esmMin((() => {
2011
2011
  name = "extract-youtube";
2012
- version = "1.0.292";
2012
+ version = "1.0.294";
2013
2013
  description = "Fast, no-browser serverless-optimized YouTube transcript extractor, with optional React UI: a floating YouTube player and a synced-transcript modal";
2014
2014
  main$1 = "dist/index.cjs";
2015
2015
  module$1 = "dist/index.mjs";