Merge 1.5.0 changes back to master.

This commit is contained in:
Mike Jumper
2023-01-10 21:59:48 -08:00
17 changed files with 585 additions and 10 deletions

View File

@@ -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
};