This commit is contained in:
Jeena 2014-03-02 01:15:33 +01:00
parent 810a74a28b
commit 39bdac0d7b
12 changed files with 118 additions and 100 deletions

View file

@ -7,20 +7,13 @@ define([
function(Parent, Nc, ProtocolHelper, ProtocolParser) {
function User(id, channel) {
Parent.call(this, id);
function User(id, options) {
Parent.call(this, id, options);
this.channel = channel;
this.player = null;
this.isReady = false;
var self = this;
Nc.on('user/joined', function(user) { // FIXME: use sendToAllUsersExcept instead
if(user.id != self.id) {
self.sendControlCommand("userJoined", user.id);
}
});
Nc.on('user/' + this.id + "/joinSuccess", function(options) {
self.sendControlCommand("joinSuccess", options);
});