const { play } = require('play-sound')
// await in async function, throw err, no access to process
await play('foo.mp3')
// or with a callback
const process = play('foo.mp3', err => {
// ...
})
which will create a new player object in each play call. Promise is returned iff callback is not provided, otherwise process is returned.
To allow functional/promisified interface like
which will create a new player object in each
play
call. Promise is returned iff callback is not provided, otherwise process is returned.With https://github.com/shime/play-sound/pull/31: