0.1.5 • Published 7 years ago

audiosprite-loader v0.1.5

Weekly downloads
2
License
MIT
Repository
github
Last release
7 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

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago