6.0.0 • Published 3 months ago
@pixi/sound v6.0.0
PixiJS Sound
WebAudio API playback library, with filters. Modern audio playback for modern browsers.
Features
- Pausing and resuming
- Independent volume control
- Support blocking or layered sounds (multiple instances)
- Support for
PIXI.Assets
system - Dynamic filters:
- ReverbFilter
- DistortionFilter
- EqualizerFilter
- StereoFilter
- TelephoneFilter
Known Compatibility
- Chrome 58+
- Firefox 52+
- Safari 11+
- iOS 11+
Usage
Installation is available by NPM:
npm i @pixi/sound --save
To import into your project, for instance, when using Webpack, Parcel, Rollup, or another bundler:
import { sound } from '@pixi/sound';
sound.add('my-sound', 'path/to/file.mp3');
sound.play('my-sound');
Browser Usage
If you're using a <script>
element to import @pixi/sound
into your project, then the SoundLibrary object is PIXI.sound
global.
<!-- PixiJS must be imported before @pixi/sound -->
<script src="https://unpkg.com/pixi.js/dist/browser/pixi.min.js"></script>
<!-- found here, if not using CDN "./node_modules/@pixi/sound/dist/pixi-sound.js" -->
<script src="https://unpkg.com/@pixi/sound/dist/pixi-sound.js"></script>
<script>
PIXI.sound.add('my-sound', 'path/to/file.mp3');
PIXI.sound.play('my-sound');
</script>
Versions Compatibility
PixiJS | PixiJS Sound |
---|---|
v5.x - v6.x | v4.x |
v7.x | v5.x |
v8.x | v6.x |
Resources
License
MIT License.
6.0.0
3 months ago
5.2.3
3 months ago
6.0.0-rc
3 months ago
5.2.2
7 months ago
5.2.1
9 months ago
4.4.1
9 months ago
5.2.0
12 months ago
4.4.0
12 months ago
5.1.2
1 year ago
5.1.1
1 year ago
4.3.3
1 year ago
5.1.0
1 year ago
4.3.2
1 year ago
5.0.0
2 years ago
4.3.1
2 years ago
4.3.0
2 years ago
4.2.1
2 years ago
4.1.0
2 years ago
4.2.0
2 years ago
4.1.1
2 years ago
4.0.6
3 years ago
4.0.5
3 years ago
4.0.4
3 years ago
4.0.3
3 years ago
4.0.2
3 years ago
4.0.1
3 years ago
4.0.0
3 years ago