Add voice websocket handling

This commit is contained in:
Amish Shah
2016-08-23 19:13:09 +01:00
parent d8b1ef47cd
commit f713f52841
5 changed files with 88 additions and 3 deletions

View File

@@ -0,0 +1,19 @@
const VoiceConnectionWebSocket = require('./VoiceConnectionWebSocket');
const EventEmitter = require('events').EventEmitter;
class VoiceConnection extends EventEmitter {
constructor(manager, serverID, token, sessionID, endpoint) {
super();
this.manager = manager;
this.websocket = new VoiceConnectionWebSocket(this, serverID, token, sessionID, endpoint);
this.bindListeners();
}
bindListeners() {
this.websocket.on('ready-for-udp', data => {
console.log(data);
});
}
}
module.exports = VoiceConnection;