Reference / @open-music-sdk/util-artwork / tArtworkOptions
Interface: tArtworkOptions
Defined in: artwork.ts:30
What artworkUrl takes beside the artwork and the width. Invalid values throw a TypeError.
Extended by
Properties
crop?
readonly optional crop?: string;Defined in: artwork.ts:45
Apple's code for how the image is cut to the box, such as "bb", the whole image fitted inside it, or "sr", the box filled. Default: the one the template names, or "bb" where it leaves that open as {c}.
Apple does not document the codes, so any code of the right shape is taken, its case kept: letters and digits, with single dots or hyphens between them, 32 characters at most, the dots and hyphens included, as in bb-60 or SC.DN01, which comes with some editorial artwork. A code that is neither bb nor cc, with or without a hyphen and more after it, is taken to fill the box exactly, as every other code tried did; if yours does not, lay the image out yourself.
format?
readonly optional format?: "jpg" | "jpeg" | "png" | "webp" | "heic" | "heif";Defined in: artwork.ts:34
The file format. Default: the one the template names, or "jpg" where it leaves that open as {f}.
height?
readonly optional height?: number;Defined in: artwork.ts:32
Height in CSS pixels. Default: the height that keeps the artwork's own shape at width, or width where its shape is unknown.
hosts?
readonly optional hosts?: readonly string[];Defined in: artwork.ts:51
The hosts artwork may come from, such as ["mzstatic.com"], where Apple serves its catalog artwork. With this, a URL that is not https on one of them or on a subdomain of one, with no port and no credentials, is a TypeError and nothing is returned. Default: where the URL points is not checked at all.