Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gamestdio/audiosprite-loader
Audio Sprite Loader and Plugin for Webpack
https://github.com/gamestdio/audiosprite-loader
webpack webpack-loader webpack-plugin
Last synced: 9 days ago
JSON representation
Audio Sprite Loader and Plugin for Webpack
- Host: GitHub
- URL: https://github.com/gamestdio/audiosprite-loader
- Owner: gamestdio
- License: mit
- Created: 2018-02-17T00:32:14.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-02-21T02:36:51.000Z (over 6 years ago)
- Last Synced: 2024-10-31T19:38:39.645Z (14 days ago)
- Topics: webpack, webpack-loader, webpack-plugin
- Language: TypeScript
- Size: 154 KB
- Stars: 3
- Watchers: 3
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Webpack Audio Sprite Loader & Plugin
Audio Sprite loader for Webpack. This loader currently only supports [howler.js](https://github.com/goldfire/howler.js/) format. It should be pretty easy to support other audio libraries though.
- [Usage](#usage)
- [Dependencies](#dependencies)## Usage
Install the loader.
```
npm install audiosprite-loader
```**`webpack.config.js`**
```javascript
const AudioSprite = require("audiosprite-loader");module.exports = {
module: {
loaders: [
{
test: /\.(wav|mp3)$/,
loader: AudioSprite.loader()
}
]
},
plugins: [
new AudioSprite.Plugin()
]
}
```**`index.js`**
```javascript
const audio = require("./audio/file.wav");
audio.play();
```## Dependencies
You'll need `ffmpeg` installed.
**OSX**
```
brew install ffmpeg --with-theora --with-libvorbis
```## License
MIT