Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

constants.ts 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /**
  2. * The type of remote control messages.
  3. */
  4. export const REMOTE_CONTROL_MESSAGE_NAME = 'remote-control';
  5. /**
  6. * The value for the "var" attribute of feature tag in disco-info packets.
  7. */
  8. export const DISCO_REMOTE_CONTROL_FEATURE = 'http://jitsi.org/meet/remotecontrol';
  9. /**
  10. * The remote control event.
  11. *
  12. * @typedef {object} RemoteControlEvent
  13. * @property {EVENTS | REQUESTS} type - The type of the message.
  14. * @property {number} x - Avaibale for type === mousemove only. The new x
  15. * coordinate of the mouse.
  16. * @property {number} y - For mousemove type - the new y
  17. * coordinate of the mouse and for mousescroll - represents the vertical
  18. * scrolling diff value.
  19. * @property {number} button - 1(left), 2(middle) or 3 (right). Supported by
  20. * mousedown, mouseup and mousedblclick types.
  21. * @property {KEYS} key - Represents the key related to the event. Supported by
  22. * keydown and keyup types.
  23. * @property {KEYS[]} modifiers - Represents the modifier related to the event.
  24. * Supported by keydown and keyup types.
  25. * @property {PERMISSIONS_ACTIONS} action - Supported by type === permissions.
  26. * Represents the action related to the permissions event.
  27. */
  28. /**
  29. * Optional properties. Supported for permissions event for action === request.
  30. *
  31. * @property {string} userId - The user id of the participant that has sent the
  32. * request.
  33. * @property {string} userJID - The full JID in the MUC of the user that has
  34. * sent the request.
  35. * @property {string} displayName - The displayName of the participant that has
  36. * sent the request.
  37. * @property {boolean} screenSharing - True if the SS is started for the local
  38. * participant and false if not.
  39. */
  40. /**
  41. * Types of remote-control events.
  42. *
  43. * @readonly
  44. * @enum {string}
  45. */
  46. export const EVENTS = {
  47. mousemove: 'mousemove',
  48. mousedown: 'mousedown',
  49. mouseup: 'mouseup',
  50. mousedblclick: 'mousedblclick',
  51. mousescroll: 'mousescroll',
  52. keydown: 'keydown',
  53. keyup: 'keyup',
  54. permissions: 'permissions',
  55. start: 'start',
  56. stop: 'stop',
  57. supported: 'supported'
  58. };
  59. /**
  60. * Types of remote-control requests.
  61. *
  62. * @readonly
  63. * @enum {string}
  64. */
  65. export const REQUESTS = {
  66. start: 'start'
  67. };
  68. /**
  69. * Actions for the remote control permission events.
  70. *
  71. * @readonly
  72. * @enum {string}
  73. */
  74. export const PERMISSIONS_ACTIONS = {
  75. request: 'request',
  76. grant: 'grant',
  77. deny: 'deny',
  78. error: 'error'
  79. };