foo-webview-sdk
    Preparing search index...

    Interface MetadataEmbedArtworkParams

    Parameters for metadata.embedArtwork. Write a picture into a track's tags, into an image file next to it, or both. With one target the result describes that write; with both, each target's outcome is reported under results and the call fails with OPERATION_FAILED only when both failed.

    interface MetadataEmbedArtworkParams {
        filename?: string;
        imageData: string;
        path: string;
        target?: string[];
        type?:
            | "back"
            | "front"
            | "cover_front"
            | "cover_back"
            | "disc"
            | "icon"
            | "artist";
    }
    Index
    filename?: string

    File name for the file target, used as it is instead of the derived one (no extension is added); must be a plain name without separators or traversal.

    imageData: string

    The image as plain Base64, without a Data URL header or a base64: marker. Characters outside the Base64 alphabet are skipped and decoding stops at the first =; input that decodes to no bytes fails with INVALID_PARAMS.

    path: string

    Track path. The embedded target writes into this file, which needs a format the album art editor supports; the file target writes into its directory with a |subsong:N suffix dropped, so every track of a CUE sheet shares one image.

    target?: string[]

    Where to write: embedded (into the file's tags), file (an image next to the audio file, named after type, cover for the front picture, with the extension read from the image bytes), or all for both; several entries write to each. Omitted, it writes embedded. Any other value fails with INVALID_PARAMS.

    type?:
        | "back"
        | "front"
        | "cover_front"
        | "cover_back"
        | "disc"
        | "icon"
        | "artist"

    Picture type.

    "front"