audio-play
Play audio buffer, browser/node-wise.
Usage
const play = require('audio-play');
const load = require('audio-loader');
load('./sample.mp3').then(play);
API
const play = require('audio-play');
let pause = play(audioBuffer, {
start: 0,
end: audioBuffer.duration,
loop: false,
rate: 1,
detune: 0,
volume: 1,
device: 'hw:1,0',
context: require('audio-context'),
autoplay: true
}, onend?);
play = pause();
pause = play();
let playback = play(buffer, opts?, cb?);
playback.pause();
playback.play();
playback.currentTime;
Related