2020-11-14 04:09:25 +00:00
|
|
|
/**
|
|
|
|
* The type of remote control messages.
|
|
|
|
*/
|
|
|
|
export const REMOTE_CONTROL_MESSAGE_NAME = 'remote-control';
|
|
|
|
|
2016-12-20 22:15:13 +00:00
|
|
|
/**
|
|
|
|
* The value for the "var" attribute of feature tag in disco-info packets.
|
|
|
|
*/
|
2020-11-14 04:09:25 +00:00
|
|
|
export const DISCO_REMOTE_CONTROL_FEATURE = 'http://jitsi.org/meet/remotecontrol';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The remote control event.
|
2021-11-04 21:10:43 +00:00
|
|
|
*
|
2020-11-14 04:09:25 +00:00
|
|
|
* @typedef {object} RemoteControlEvent
|
2021-11-04 21:10:43 +00:00
|
|
|
* @property {EVENTS | REQUESTS} type - The type of the message.
|
|
|
|
* @property {number} x - Avaibale for type === mousemove only. The new x
|
|
|
|
* coordinate of the mouse.
|
2020-11-14 04:09:25 +00:00
|
|
|
* @property {number} y - For mousemove type - the new y
|
|
|
|
* coordinate of the mouse and for mousescroll - represents the vertical
|
2021-11-04 21:10:43 +00:00
|
|
|
* scrolling diff value.
|
2020-11-14 04:09:25 +00:00
|
|
|
* @property {number} 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.
|
2021-11-26 08:11:23 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Optional properties. Supported for permissions event for action === request.
|
2020-11-14 04:09:25 +00:00
|
|
|
*
|
|
|
|
* @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.
|
2021-11-26 08:11:23 +00:00
|
|
|
* @property {string} displayName - The displayName of the participant that has
|
2020-11-14 04:09:25 +00:00
|
|
|
* sent the request.
|
2021-11-26 08:11:23 +00:00
|
|
|
* @property {boolean} screenSharing - True if the SS is started for the local
|
2020-11-14 04:09:25 +00:00
|
|
|
* participant and false if not.
|
|
|
|
*/
|
2016-12-20 22:15:13 +00:00
|
|
|
|
|
|
|
/**
|
2017-06-22 21:28:57 +00:00
|
|
|
* Types of remote-control events.
|
2021-11-04 21:10:43 +00:00
|
|
|
*
|
2017-01-19 23:19:58 +00:00
|
|
|
* @readonly
|
|
|
|
* @enum {string}
|
2016-12-20 22:15:13 +00:00
|
|
|
*/
|
2017-06-22 21:28:57 +00:00
|
|
|
export const EVENTS = {
|
2017-10-12 23:02:29 +00:00
|
|
|
mousemove: 'mousemove',
|
|
|
|
mousedown: 'mousedown',
|
|
|
|
mouseup: 'mouseup',
|
|
|
|
mousedblclick: 'mousedblclick',
|
|
|
|
mousescroll: 'mousescroll',
|
|
|
|
keydown: 'keydown',
|
|
|
|
keyup: 'keyup',
|
|
|
|
permissions: 'permissions',
|
|
|
|
start: 'start',
|
|
|
|
stop: 'stop',
|
|
|
|
supported: 'supported'
|
2016-12-28 00:46:55 +00:00
|
|
|
};
|
|
|
|
|
2017-06-22 21:28:57 +00:00
|
|
|
/**
|
|
|
|
* Types of remote-control requests.
|
2021-11-04 21:10:43 +00:00
|
|
|
*
|
2017-06-22 21:28:57 +00:00
|
|
|
* @readonly
|
|
|
|
* @enum {string}
|
|
|
|
*/
|
|
|
|
export const REQUESTS = {
|
2017-10-12 23:02:29 +00:00
|
|
|
start: 'start'
|
2017-06-22 21:28:57 +00:00
|
|
|
};
|
|
|
|
|
2016-12-28 00:46:55 +00:00
|
|
|
/**
|
|
|
|
* Actions for the remote control permission events.
|
2021-11-04 21:10:43 +00:00
|
|
|
*
|
2017-01-19 23:19:58 +00:00
|
|
|
* @readonly
|
|
|
|
* @enum {string}
|
2016-12-28 00:46:55 +00:00
|
|
|
*/
|
|
|
|
export const PERMISSIONS_ACTIONS = {
|
2017-10-12 23:02:29 +00:00
|
|
|
request: 'request',
|
|
|
|
grant: 'grant',
|
|
|
|
deny: 'deny',
|
|
|
|
error: 'error'
|
2016-12-20 22:15:13 +00:00
|
|
|
};
|
|
|
|
|