Fix redeclaration

This commit is contained in:
abalabahaha
2016-10-02 13:11:26 +09:00
parent 015eb9c546
commit 972558f030
4 changed files with 14 additions and 15 deletions

View File

@@ -276,12 +276,12 @@ var VoiceConnection = (function (_EventEmitter) {
}
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
return new Promise(function (resolve, reject) {
_this.encoder.encodeFile(stream, options)["catch"](error).then(function (data) {
_this.encoder.encodeFile(stream, options).then(function (data) {
self.streamProc = data.proc;
var intent = self.playStream(data.stream, 2);
resolve(intent);
callback(null, intent);
});
})["catch"](error);
function error() {
var e = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
@@ -308,13 +308,13 @@ var VoiceConnection = (function (_EventEmitter) {
}
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
return new Promise(function (resolve, reject) {
_this2.encoder.encodeStream(stream, options)["catch"](error).then(function (data) {
_this2.encoder.encodeStream(stream, options).then(function (data) {
self.streamProc = data.proc;
self.instream = data.instream;
var intent = self.playStream(data.stream);
resolve(intent);
callback(null, intent);
});
})["catch"](error);
function error() {
var e = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
@@ -343,13 +343,13 @@ var VoiceConnection = (function (_EventEmitter) {
}
options.volume = options.volume !== undefined ? options.volume : this.getVolume();
return new Promise(function (resolve, reject) {
_this3.encoder.encodeArbitraryFFmpeg(ffmpegOptions, options)["catch"](error).then(function (data) {
_this3.encoder.encodeArbitraryFFmpeg(ffmpegOptions, options).then(function (data) {
self.streamProc = data.proc;
self.instream = data.instream;
var intent = self.playStream(data.stream);
resolve(intent);
callback(null, intent);
});
})["catch"](error);
function error() {
var e = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];