How to use music-metadata-browser - 5 common examples

To help you get started, we’ve selected a few music-metadata-browser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ctf0 / Laravel-Media-Manager / src / resources / assets / js / webworkers / audio.js View on Github external
self.addEventListener('message', (e) => {
    let url = e.data

    musicMetadata.fetchFromUrl(url)
        .then((val) => {
            let res = val.common
            let picture = res.picture

            self.postMessage({
                artist: res.artist,
                title: res.title,
                album: res.album,
                track: res.track.no,
                track_total: res.track.of,
                year: res.year,
                genre: res.genre ? res.genre[0] : null,
                cover: picture
                    ? URL.createObjectURL(new Blob([picture[0].data.buffer]))
                    : null
            })

music-metadata-browser

Browserifed version of music-metadata

MIT
Latest version published 4 months ago

Package Health Score

48 / 100
Full package analysis