您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

constants.js 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. * Optional properties. Supported for permissions event for action === request:
  29. * @property {string} userId - The user id of the participant that has sent the
  30. * request.
  31. * @property {string} userJID - The full JID in the MUC of the user that has
  32. * sent the request.
  33. * @property {string} displayName - the displayName of the participant that has
  34. * sent the request.
  35. * @property {boolean} screenSharing - true if the SS is started for the local
  36. * participant and false if not.
  37. */
  38. /**
  39. * Types of remote-control events.
  40. *
  41. * @readonly
  42. * @enum {string}
  43. */
  44. export const EVENTS = {
  45. mousemove: 'mousemove',
  46. mousedown: 'mousedown',
  47. mouseup: 'mouseup',
  48. mousedblclick: 'mousedblclick',
  49. mousescroll: 'mousescroll',
  50. keydown: 'keydown',
  51. keyup: 'keyup',
  52. permissions: 'permissions',
  53. start: 'start',
  54. stop: 'stop',
  55. supported: 'supported'
  56. };
  57. /**
  58. * Types of remote-control requests.
  59. *
  60. * @readonly
  61. * @enum {string}
  62. */
  63. export const REQUESTS = {
  64. start: 'start'
  65. };
  66. /**
  67. * Actions for the remote control permission events.
  68. *
  69. * @readonly
  70. * @enum {string}
  71. */
  72. export const PERMISSIONS_ACTIONS = {
  73. request: 'request',
  74. grant: 'grant',
  75. deny: 'deny',
  76. error: 'error'
  77. };