import { SpotifyMediaProps } from "./props.js"; //#region src/dom/spotify/source.d.ts /** * Spotify engine options, spelled exactly as Spotify spells them * (https://developer.spotify.com/documentation/embeds). They are serialized onto * the embed URL verbatim, so what you write here is what the embed reads. * * Spotify publishes only a handful of them, and the ones the host owns are * deliberately absent: the start position comes from the `t` parameter on `src`. * The index signature still carries anything not listed here, so undocumented * knobs and whatever Spotify adds next keep working. */ interface SpotifyEngineConfig extends Record { /** Start position in seconds. */ t?: number; /** * `0` renders the embed in its dark theme. Defaults to the light theme. Spotify * documents no other value, and the embed goes by whether the parameter is * there, so leaving it out is the only way to ask for the default. */ theme?: 0; /** * Embed the video variant of an episode when it has one. Not a URL parameter: * the video embed lives at its own path. */ preferVideo?: boolean; /** `referrerpolicy` for the embed iframe. Not a Spotify embed parameter. */ referrerPolicy?: ReferrerPolicy; } /** Structured Spotify source: which source to play, plus how to play it. */ interface SpotifySource { /** Spotify URL or URI. Mirrors the host's `src` property. */ src?: string | undefined; /** Playback options, keyed by the engine that reads them. */ engine?: SpotifySourceEngineConfig | undefined; } /** The engines a Spotify source can configure. */ interface SpotifySourceEngineConfig { /** Spotify's own embed options, passed through untouched. */ spotify?: SpotifyEngineConfig | undefined; } /** The entities Spotify can embed. */ type SpotifyEntityType = 'track' | 'episode' | 'album' | 'playlist' | 'show' | 'artist'; /** Parsed pieces of a Spotify source URL or URI. */ interface ParsedSpotifySource { /** Which kind of entity the embed plays; it names the embed path. */ type: SpotifyEntityType; /** Base62 entity id. */ id: string; /** Start position in seconds parsed from the `t` parameter. */ startTime: number | null; } /** Extract a Spotify entity id from any recognized URL or `spotify:` URI. */ declare function parseSpotifyEntityId(src: string): string | null; /** * Parse a Spotify source string. Recognizes `open.spotify.com` URLs for every * embeddable entity — including the localized (`/intl-de/`) and already-embedded * (`/embed/`) forms, since the entity type and id sit in the same place in all of * them — `spotify::` URIs, and start positions via the `t` parameter. */ declare function parseSpotifySource(src: string): ParsedSpotifySource | null; /** Build the iframe `src` URL for an initial Spotify embed from the given props. */ declare function buildSpotifyIframeSrc(src: string, props?: Partial): string; //#endregion export { ParsedSpotifySource, SpotifyEngineConfig, SpotifyEntityType, SpotifySource, SpotifySourceEngineConfig, buildSpotifyIframeSrc, parseSpotifyEntityId, parseSpotifySource }; //# sourceMappingURL=source.d.ts.map