0.1.5 • Published 6 years ago

audiosprite-loader v0.1.5

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Webpack Audio Sprite Loader & Plugin

Audio Sprite loader for Webpack. This loader currently only supports howler.js format. It should be pretty easy to support other audio libraries though.

Usage

Install the loader.

npm install audiosprite-loader

webpack.config.js

const AudioSprite = require("audiosprite-loader");

module.exports = {
    module: {
        loaders: [
            {
              test: /\.(wav|mp3)$/,
              loader: AudioSprite.loader()
            }
        ]
    },
    plugins: [
        new AudioSprite.Plugin()
    ]
}

index.js

const audio = require("./audio/file.wav");
audio.play();

Dependencies

You'll need ffmpeg installed.

OSX

brew install ffmpeg --with-theora --with-libvorbis

License

MIT

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago