• Creates a valid AudioMetadata.

    Parameters

    • input: AudioOptions

      Use your IDE suggestions for an enhanced development experience

    Returns AudioMetadata

    Example

    Single track:

    const metadata = audio({
    title: 'Great song!',
    audio: {
    item: 'https://example.com/song.mp3',
    type: MediaAudioMimeType.MP3,
    artist: 'John Doe',
    cover: 'https://example.com/cover.png',
    },
    });

    Example

    Album:

    const metadata = audio({
    title: 'Great song!',
    audio: {
    item: 'https://example.com/sample.mp3',
    type: MediaAudioMimeType.MP3,
    duration: 60,
    artist: 'John Doe',
    cover: 'https://example.com/cover.png',
    },
    attachments: [
    {
    item: 'https://example.com/song-1.mp3',
    type: MediaAudioMimeType.MP3,
    duration: 234,
    },
    {
    item: 'https://example.com/song-2.mp3',
    type: MediaAudioMimeType.MP3,
    duration: 345,
    },
    ],
    });