mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
Add audio/video/size event functions.
This commit is contained in:
@@ -320,6 +320,52 @@ Guacamole.Client = function(tunnel) {
|
||||
return bounds;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sends a supported audio mimetype.
|
||||
*
|
||||
* @param {String} mimetype The supported mimetype to send.
|
||||
*/
|
||||
this.sendAudioMimetype = function(mimetype) {
|
||||
|
||||
// Do not send requests if not connected
|
||||
if (!isConnected())
|
||||
return;
|
||||
|
||||
tunnel.sendMessage("audio", mimetype);
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Sends a supported video mimetype.
|
||||
*
|
||||
* @param {String} mimetype The supported mimetype to send.
|
||||
*/
|
||||
this.sendVideoMimetype = function(mimetype) {
|
||||
|
||||
// Do not send requests if not connected
|
||||
if (!isConnected())
|
||||
return;
|
||||
|
||||
tunnel.sendMessage("video", mimetype);
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Sends the current size of the screen.
|
||||
*
|
||||
* @param {Number} width The width of the screen.
|
||||
* @param {Number} height The height of the screen.
|
||||
*/
|
||||
this.sendSize = function(width, height) {
|
||||
|
||||
// Do not send requests if not connected
|
||||
if (!isConnected())
|
||||
return;
|
||||
|
||||
tunnel.sendMessage("size", width, height);
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Sends a key event having the given properties as if the user
|
||||
* pressed or released a key.
|
||||
|
Reference in New Issue
Block a user