2016-12-20 22:15:13 +00:00
|
|
|
/**
|
|
|
|
* The value for the "var" attribute of feature tag in disco-info packets.
|
|
|
|
*/
|
|
|
|
export const DISCO_REMOTE_CONTROL_FEATURE
|
|
|
|
= "http://jitsi.org/meet/remotecontrol";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Types of remote-control-event events.
|
2017-01-19 23:19:58 +00:00
|
|
|
* @readonly
|
|
|
|
* @enum {string}
|
2016-12-20 22:15:13 +00:00
|
|
|
*/
|
|
|
|
export const EVENT_TYPES = {
|
|
|
|
mousemove: "mousemove",
|
|
|
|
mousedown: "mousedown",
|
|
|
|
mouseup: "mouseup",
|
|
|
|
mousedblclick: "mousedblclick",
|
|
|
|
mousescroll: "mousescroll",
|
|
|
|
keydown: "keydown",
|
2016-12-28 00:46:55 +00:00
|
|
|
keyup: "keyup",
|
|
|
|
permissions: "permissions",
|
|
|
|
stop: "stop",
|
|
|
|
supported: "supported"
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Actions for the remote control permission events.
|
2017-01-19 23:19:58 +00:00
|
|
|
* @readonly
|
|
|
|
* @enum {string}
|
2016-12-28 00:46:55 +00:00
|
|
|
*/
|
|
|
|
export const PERMISSIONS_ACTIONS = {
|
|
|
|
request: "request",
|
|
|
|
grant: "grant",
|
2017-01-06 01:18:07 +00:00
|
|
|
deny: "deny",
|
|
|
|
error: "error"
|
2016-12-20 22:15:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The type of remote control events sent trough the API module.
|
|
|
|
*/
|
2017-05-02 22:39:36 +00:00
|
|
|
export const REMOTE_CONTROL_EVENT_NAME = "remote-control-event";
|
2017-01-19 23:19:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The remote control event.
|
|
|
|
* @typedef {object} RemoteControlEvent
|
|
|
|
* @property {EVENT_TYPES} type - the type of the event
|
|
|
|
* @property {int} x - avaibale for type === mousemove only. The new x
|
|
|
|
* coordinate of the mouse
|
|
|
|
* @property {int} y - For mousemove type - the new y
|
|
|
|
* coordinate of the mouse and for mousescroll - represents the vertical
|
|
|
|
* scrolling diff value
|
|
|
|
* @property {int} button - 1(left), 2(middle) or 3 (right). Supported by
|
|
|
|
* mousedown, mouseup and mousedblclick types.
|
|
|
|
* @property {KEYS} key - Represents the key related to the event. Supported by
|
|
|
|
* keydown and keyup types.
|
|
|
|
* @property {KEYS[]} modifiers - Represents the modifier related to the event.
|
|
|
|
* Supported by keydown and keyup types.
|
|
|
|
* @property {PERMISSIONS_ACTIONS} action - Supported by type === permissions.
|
|
|
|
* Represents the action related to the permissions event.
|
|
|
|
*
|
|
|
|
* Optional properties. Supported for permissions event for action === request:
|
|
|
|
* @property {string} userId - The user id of the participant that has sent the
|
|
|
|
* request.
|
|
|
|
* @property {string} userJID - The full JID in the MUC of the user that has
|
|
|
|
* sent the request.
|
|
|
|
* @property {string} displayName - the displayName of the participant that has
|
|
|
|
* sent the request.
|
|
|
|
* @property {boolean} screenSharing - true if the SS is started for the local
|
|
|
|
* participant and false if not.
|
|
|
|
*/
|