@lucaismyname/ginger 0.0.49 → 0.0.51

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.
Files changed (2) hide show
  1. package/README.md +27 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -207,6 +207,32 @@ function RemoteAwarePlayer() {
207
207
 
208
208
  Snapshots send the current queue order with **`isShuffled: false`** so followers do not re-randomize; the visible order matches the leader. **`claimLeadership()`** requests leadership (lexicographically smaller tab IDs win conflicts).
209
209
 
210
+ `@lucaismyname/ginger/remote` also exports **`DEFAULT_REMOTE_CHANNEL_NAME`** and the **`RemoteMessage`** type if you need to share protocol constants or type your own channel helpers.
211
+
212
+ ### Crossfade (`@lucaismyname/ginger/crossfade`)
213
+
214
+ Adds a Web Audio crossfade graph for **overlap-based** transitions between outgoing and incoming media. This is distinct from the longer-term **gapless** work: crossfade overlaps two sources on purpose, while gapless aims for seamless adjacent track boundaries on a single playback path.
215
+
216
+ ```tsx
217
+ import { useGingerCrossfade } from "@lucaismyname/ginger/crossfade";
218
+
219
+ function CrossfadeSetup() {
220
+ const { status, error } = useGingerCrossfade({
221
+ enabled: true,
222
+ durationMs: 1200,
223
+ });
224
+
225
+ return (
226
+ <div>
227
+ <p>Status: {status}</p>
228
+ {error && <p role="alert">{error}</p>}
229
+ </div>
230
+ );
231
+ }
232
+ ```
233
+
234
+ For lower-level integrations, the subpath also exports **`attachCrossfadeGraph`**, **`scheduleCrossfade`**, and **`teardownCrossfadeGraph`** plus the related graph/curve types. Like EQ and spatial audio, crossfade attaches to the active Ginger media graph and should be torn down when you unmount or switch playback strategies.
235
+
210
236
  ### Experimental Notice
211
237
 
212
238
  `@lucaismyname/ginger/experimental-gapless` is intentionally non-production.
@@ -1249,7 +1275,7 @@ See [Recipes — Updating the queue after mount](#updating-the-queue-after-mount
1249
1275
 
1250
1276
  These priorities guide new work in the library; they are not a guarantee of shipping order.
1251
1277
 
1252
- 1. **Music libraries and continuous listening** — Features that make track-to-track playback feel better come first: **next-track prefetch** (`useNextTrackPrefetch`), future gapless or crossfade (see `@lucaismyname/ginger/experimental-gapless`), and first-class **chapter** / **synced lyrics** UI (`Ginger.Current.Chapters`, `Ginger.Current.LyricsSynced`).
1278
+ 1. **Music libraries and continuous listening** — Features that make track-to-track playback feel better come first: **next-track prefetch** (`useNextTrackPrefetch`), shipped **crossfade** (`@lucaismyname/ginger/crossfade`), ongoing **gapless** capability work (`@lucaismyname/ginger/experimental-gapless`), and first-class **chapter** / **synced lyrics** UI (`Ginger.Current.Chapters`, `Ginger.Current.LyricsSynced`).
1253
1279
  2. **Podcasts and live-style streams** — **HLS / DASH** integration is emphasized when a concrete app needs it; the core package stays on native `<audio>` with optional adapters or documentation rather than hard dependencies. **SRT / WebVTT** transcripts are supported via `@lucaismyname/ginger/transcript`.
1254
1280
  3. **Embedded or internal players** — **Accessibility**, persistence, and **testing** helpers are favored over heavier ecosystem integrations (Cast, proprietary cast SDKs) unless there is a dedicated use case. **Multi-tab** web apps can use `@lucaismyname/ginger/remote` (BroadcastChannel) before reaching for OS-level remote playback.
1255
1281
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucaismyname/ginger",
3
- "version": "0.0.49",
3
+ "version": "0.0.51",
4
4
  "description": "A headless React audio-player primitive",
5
5
  "type": "module",
6
6
  "sideEffects": false,