mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Merge 1.5.0 changes back to master.
This commit is contained in:
@@ -709,6 +709,21 @@ Guacamole.Client = function(tunnel) {
|
||||
* A status object which describes the error.
|
||||
*/
|
||||
this.onerror = null;
|
||||
|
||||
/**
|
||||
* Fired when an arbitrary message is received from the tunnel that should
|
||||
* be processed by the client.
|
||||
*
|
||||
* @event
|
||||
* @param {!number} msgcode
|
||||
* A status code sent by the remote server that indicates the nature of
|
||||
* the message that is being sent to the client.
|
||||
*
|
||||
* @param {string[]} args
|
||||
* An array of arguments to be processed with the message sent to the
|
||||
* client.
|
||||
*/
|
||||
this.onmsg = null;
|
||||
|
||||
/**
|
||||
* Fired when a audio stream is created. The stream provided to this event
|
||||
@@ -1427,6 +1442,12 @@ Guacamole.Client = function(tunnel) {
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
"msg" : function(parameters) {
|
||||
|
||||
if (guac_client.onmsg) guac_client.onmsg(parseInt(parameters[0]), parameters.slice(1));
|
||||
|
||||
},
|
||||
|
||||
"name": function(parameters) {
|
||||
if (guac_client.onname) guac_client.onname(parameters[0]);
|
||||
@@ -1954,3 +1975,31 @@ Guacamole.Client.DefaultTransferFunction = {
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* A list of possible messages that can be sent by the server for processing
|
||||
* by the client.
|
||||
*
|
||||
* @type {!Object.<string, number>}
|
||||
*/
|
||||
Guacamole.Client.Message = {
|
||||
|
||||
/**
|
||||
* A client message that indicates that a user has joined an existing
|
||||
* connection. This message expects a single additional argument - the
|
||||
* name of the user who has joined the connection.
|
||||
*
|
||||
* @type {!number}
|
||||
*/
|
||||
"USER_JOINED": 0x0001,
|
||||
|
||||
/**
|
||||
* A client message that indicates that a user has left an existing
|
||||
* connection. This message expects a single additional argument - the
|
||||
* name of the user who has left the connection.
|
||||
*
|
||||
* @type {!number}
|
||||
*/
|
||||
"USER_LEFT": 0x0002
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user