Turns a Bandcamp page into a queue of streams for the site's own player.
usePlayRichContent calls it when a Bandcamp link is played in native mode,
and streamSources.ts again when the streams' signed URLs expire.
f
resolveBandcampQueue(): Promise<PlayerItem[]>
pageUrl: string,
ctx?: BandcampContext,
unnamed 2?: { force?: boolean; }
Resolves the Bandcamp page pageUrl into one stream item per streamable
track, through GET /api/remote/bandcamp, each carrying ctx. force
bypasses the server's cache, for re-resolving once the signed URLs expire.
I
BandcampContext
Passed to resolveBandcampQueue by its callers and copied onto every item of the queue, since the server's tracklist knows nothing of the dump.
- dumpHref: string
-
embedUrl: string
Lets PlayerProvider fall back to Bandcamp's iframe if the streams fail.
-
fallbackArtworkUrl: string
Used only if the page carries no album art of its own.
Usage
import * as mod from "src/utils/player/bandcamp.ts";