errory voice

This commit is contained in:
Amish Shah
2016-08-24 21:38:48 +01:00
parent 48444a5444
commit 8683f45816
20 changed files with 476 additions and 13 deletions

View File

@@ -0,0 +1,15 @@
const BasePlayer = require('./BasePlayer');
const fs = require('fs-extra');
class DefaultPlayer extends BasePlayer {
playFile(file) {
const fileStream = fs.createReadStream(file).on('error', console.log);
const pcmStream = this.convertStream(fileStream).on('error', console.log);
const dispatcher = this.playPCMStream(pcmStream);
return dispatcher;
}
}
module.exports = DefaultPlayer;