actually finally send an event to queue a song, tested, debugged
This commit is contained in:
parent
b2ddc804c7
commit
43d0a1dfe9
5 changed files with 35 additions and 11 deletions
|
@ -232,7 +232,17 @@
|
|||
this._body.setSize(document.body.offsetWidth, document.body.offsetHeight);
|
||||
},
|
||||
"play": function(id) {
|
||||
console.log("Need to play " + id.toString());
|
||||
if (this._nodes.Corax && this._nodes.Corax.connected) {
|
||||
var vc = new Vocabulary();
|
||||
vc.insert("id", id.clone());
|
||||
|
||||
var ev = new Event(this._playerCtl.getPairAddress()["+="](queue), vc);
|
||||
|
||||
var socket = this._nodes.Corax.socket;
|
||||
ev.setSenderId(socket.getId().clone());
|
||||
socket.send(ev);
|
||||
ev.destructor();
|
||||
}
|
||||
},
|
||||
"_prepareNode": function(name, address, port) {
|
||||
if (this._nodes[name]) {
|
||||
|
@ -338,6 +348,8 @@
|
|||
SocketState.add("connecting", {description: "Socket is connecting to remote host"});
|
||||
SocketState.add("connected", {description: "Socket is connected"});
|
||||
|
||||
var queue = new Address(["queue"]);
|
||||
|
||||
return Lorgar;
|
||||
});
|
||||
})();
|
||||
|
|
|
@ -48,10 +48,11 @@
|
|||
|
||||
Layout.fn._onChildChangeLimits.call(this, child);
|
||||
},
|
||||
"_onClick": function() {
|
||||
"_onClick": function(e) {
|
||||
if (this._enabled) {
|
||||
this._f.activate();
|
||||
}
|
||||
e.stopPropagation();
|
||||
},
|
||||
"_onSetEnabled": function(enabled) {
|
||||
if (this._enabled !== enabled) {
|
||||
|
|
|
@ -42,10 +42,10 @@
|
|||
var song = new Label(this._infoModels.song);
|
||||
var spacer = new View(helper);
|
||||
|
||||
this.append(artist, 0, 2, 1, 1)
|
||||
this.append(song, 1, 2, 1, 1)
|
||||
this.append(album, 2, 2, 1, 1)
|
||||
this.append(spacer, 0, 3, 3, 1);
|
||||
this.append(artist, 0, 2, 1, 1, GridLayout.Aligment.LeftCenter);
|
||||
this.append(song, 1, 2, 1, 1, GridLayout.Aligment.LeftCenter);
|
||||
this.append(album, 2, 2, 1, 1, GridLayout.Aligment.LeftCenter);
|
||||
this.append(spacer, 0, 3, 3, 1, GridLayout.Aligment.LeftCenter);
|
||||
|
||||
this._uncyclic.push(this._infoModels.artist.destructor.bind(this._infoModels.artist));
|
||||
this._uncyclic.push(this._infoModels.song.destructor.bind(this._infoModels.song));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue