You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

XMPPEvents.ts 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. export enum XMPPEvents {
  2. /**
  3. * Indicates error while adding ice candidate.
  4. */
  5. ADD_ICE_CANDIDATE_FAILED = 'xmpp.add_ice_candidate_failed',
  6. // Designates an event indicating that the focus has asked us to mute our
  7. // audio.
  8. AUDIO_MUTED_BY_FOCUS = 'xmpp.audio_muted_by_focus',
  9. AUTHENTICATION_REQUIRED = 'xmpp.authentication_required',
  10. /**
  11. * Event fired when we receive a message for AV moderation approved for the local participant.
  12. */
  13. AV_MODERATION_APPROVED = 'xmpp.av_moderation.approved',
  14. /**
  15. * Event fired when the moderation enable/disable changes.
  16. */
  17. AV_MODERATION_CHANGED = 'xmpp.av_moderation.changed',
  18. /**
  19. * Event fired when we receive message that a new jid was approved.
  20. */
  21. AV_MODERATION_PARTICIPANT_APPROVED = 'xmpp.av_moderation.participant.approved',
  22. /**
  23. * Event fired when we receive message that a new jid was approved.
  24. */
  25. AV_MODERATION_PARTICIPANT_REJECTED = 'xmpp.av_moderation.participant.rejected',
  26. /**
  27. * Event fired when we receive a message for AV moderation.
  28. */
  29. AV_MODERATION_RECEIVED = 'xmpp.av_moderation.received',
  30. /**
  31. * Event fired when we receive a message for AV moderation rejected for the local participant.
  32. */
  33. AV_MODERATION_REJECTED = 'xmpp.av_moderation.rejected',
  34. /**
  35. * Event fired when we receive a message for breakout rooms.
  36. */
  37. BREAKOUT_ROOMS_EVENT = 'xmpp.breakout-rooms.event',
  38. /**
  39. * Event fired when a participant is requested to join a given (breakout) room.
  40. */
  41. BREAKOUT_ROOMS_MOVE_TO_ROOM = 'xmpp.breakout-rooms.move-to-room',
  42. /**
  43. * Event fired when the breakout rooms data was updated.
  44. */
  45. BREAKOUT_ROOMS_UPDATED = 'xmpp.breakout-rooms.updated',
  46. BRIDGE_DOWN = 'xmpp.bridge_down',
  47. /**
  48. * Triggered when 'session-accept' is received from the responder.
  49. */
  50. CALL_ACCEPTED = 'xmpp.callaccepted.jingle',
  51. // Triggered when Jicofo kills our media session, this can happen while
  52. // we're still in the MUC, when it decides to terminate the media session.
  53. // For example when the session is idle for too long, because we're the only
  54. // person in the conference room.
  55. CALL_ENDED = 'xmpp.callended.jingle',
  56. // Designates an event indicating that an offer (e.g. Jingle
  57. // session-initiate) was received.
  58. CALL_INCOMING = 'xmpp.callincoming.jingle',
  59. CHAT_ERROR_RECEIVED = 'xmpp.chat_error_received',
  60. // The conference properties (as advertised by jicofo) have changed
  61. CONFERENCE_PROPERTIES_CHANGED = 'xmpp.conference_properties_changed',
  62. /**
  63. * Event fired when conference creation timestamp is received.
  64. */
  65. CONFERENCE_TIMESTAMP_RECEIVED = 'xmpp.conference_timestamp_received',
  66. /**
  67. * This event is triggered when the ICE connects for the first time.
  68. */
  69. CONNECTION_ESTABLISHED = 'xmpp.connection.connected',
  70. // Designates an event indicating that the connection to the XMPP server
  71. // failed.
  72. CONNECTION_FAILED = 'xmpp.connection.failed',
  73. // Designates an event indicating that the media (ICE) connection failed.
  74. // This should go to the RTC module.
  75. CONNECTION_ICE_FAILED = 'xmpp.connection.ice.failed',
  76. // Designates an event indicating that the media (ICE) connection was
  77. // interrupted. This should go to the RTC module.
  78. CONNECTION_INTERRUPTED = 'xmpp.connection.interrupted',
  79. // Designates an event indicating that the media (ICE) connection was
  80. // restored. This should go to the RTC module.
  81. CONNECTION_RESTORED = 'xmpp.connection.restored',
  82. /**
  83. * Designates an event indicating connection status changes.
  84. */
  85. CONNECTION_STATUS_CHANGED = 'xmpp.connection.status.changed',
  86. // Designates an event indicating that the display name of a participant
  87. // has changed.
  88. DISPLAY_NAME_CHANGED = 'xmpp.display_name_changed',
  89. /**
  90. * Event for incoming presence error which is for required display name.
  91. */
  92. DISPLAY_NAME_REQUIRED = 'xmpp.display_name_required',
  93. /**
  94. * Chat room instance have been added to Strophe.emuc plugin.
  95. */
  96. EMUC_ROOM_ADDED = 'xmpp.emuc_room_added',
  97. /**
  98. * Chat room instance have been removed from Strophe.emuc plugin.
  99. */
  100. EMUC_ROOM_REMOVED = 'xmpp.emuc_room_removed',
  101. ETHERPAD = 'xmpp.etherpad',
  102. /**
  103. * Event fired when we receive a message for files sharing.
  104. */
  105. FILE_SHARING_EVENT = 'xmpp.files-sharing.event',
  106. /**
  107. * Event emitted when a list file is received in the conference.
  108. */
  109. FILE_SHARING_FILES_RECEIVED = 'xmpp.files-sharing.list',
  110. /**
  111. * Event emitted when a file is added to the conference.
  112. */
  113. FILE_SHARING_FILE_ADDED = 'xmpp.files-sharing.add',
  114. /**
  115. * Event emitted when a file is removed from the conference.
  116. */
  117. FILE_SHARING_FILE_REMOVED = 'xmpp.files-sharing.remove',
  118. FOCUS_DISCONNECTED = 'xmpp.focus_disconnected',
  119. FOCUS_LEFT = 'xmpp.focus_left',
  120. GRACEFUL_SHUTDOWN = 'xmpp.graceful_shutdown',
  121. // Designates an event indicating that the local ICE connection state has
  122. // changed.
  123. ICE_CONNECTION_STATE_CHANGED = 'xmpp.ice_connection_state_changed',
  124. // Designates an event indicating that an invite XMPP message in the MUC was
  125. // received.
  126. INVITE_MESSAGE_RECEIVED = 'xmpp.invite_message_received',
  127. /**
  128. * Event which is emitted when the body in an XMPP message in the MUC
  129. * contains JSON
  130. * TODO: this event contains a typo (xmmp vs xmpp) but it's unlikely this can be changed now
  131. */
  132. JSON_MESSAGE_RECEIVED = 'xmmp.json_message_received',
  133. /**
  134. * Designates an event indicating that we were kicked from the XMPP MUC.
  135. * @param {boolean} isSelfPresence - whether it is for local participant
  136. * or another participant.
  137. * @param {string} actorJid - the jid of the participant who was initiator
  138. * of the kick.
  139. * @param {?string} participantJid - when it is not a kick for local participant,
  140. * this is the jid of the participant which was kicked.
  141. */
  142. KICKED = 'xmpp.kicked',
  143. // Designates an event indicating that our role in the XMPP MUC has changed.
  144. LOCAL_ROLE_CHANGED = 'xmpp.localrole_changed',
  145. /**
  146. * Event fired when the unique meeting id is set.
  147. */
  148. MEETING_ID_SET = 'xmpp.meeting_id_set',
  149. // Designates an event indicating that an XMPP message in the MUC was
  150. // received.
  151. MESSAGE_RECEIVED = 'xmpp.message_received',
  152. // Designates an event indicating that a participant was denied access to a conference from the lobby XMPP MUC.
  153. MUC_DENIED_ACCESS = 'xmpp.muc_denied access',
  154. // Designates an event indicating that the XMPP MUC was destroyed.
  155. MUC_DESTROYED = 'xmpp.muc_destroyed',
  156. // Designates an event indicating that we have joined the XMPP MUC.
  157. MUC_JOINED = 'xmpp.muc_joined',
  158. // Designates an event indicating that we are currently in process of joining the XMPP MUC.
  159. MUC_JOIN_IN_PROGRESS = 'xmpp.muc_join_in_progress',
  160. // Designates an event indicating that local participant left the muc
  161. MUC_LEFT = 'xmpp.muc_left',
  162. // Designates an event indicating that a participant joined the lobby XMPP MUC.
  163. MUC_LOBBY_MEMBER_JOINED = 'xmpp.muc_lobby_member_joined',
  164. // Designates an event indicating that a participant left the XMPP MUC.
  165. MUC_LOBBY_MEMBER_LEFT = 'xmpp.muc_lobby_member_left',
  166. // Designates an event indicating that a participant in the lobby XMPP MUC has been updated
  167. MUC_LOBBY_MEMBER_UPDATED = 'xmpp.muc_lobby_member_updated',
  168. // Designates an event indicating that the MUC has been locked or unlocked.
  169. MUC_LOCK_CHANGED = 'xmpp.muc_lock_changed',
  170. // Designates an event indicating that the MUC members only config has changed.
  171. MUC_MEMBERS_ONLY_CHANGED = 'xmpp.muc_members_only_changed',
  172. // Designates an event indicating that a bot participant type had changed
  173. MUC_MEMBER_BOT_TYPE_CHANGED = 'xmpp.muc_member_bot_type_changed',
  174. // Designates an event indicating that a participant joined the XMPP MUC.
  175. MUC_MEMBER_JOINED = 'xmpp.muc_member_joined',
  176. // Designates an event indicating that a participant left the XMPP MUC.
  177. MUC_MEMBER_LEFT = 'xmpp.muc_member_left',
  178. // Designates an event indicating that the MUC role of a participant has
  179. // changed.
  180. MUC_ROLE_CHANGED = 'xmpp.muc_role_changed',
  181. // Designates an event indicating that the MUC visitors support has changed.
  182. MUC_VISITORS_SUPPORTED_CHANGED = 'xmpp.muc_visitors_supported_changed',
  183. // Designates an event indicating that a participant in the XMPP MUC has
  184. // advertised that they have audio muted (or unmuted).
  185. PARTICIPANT_AUDIO_MUTED = 'xmpp.audio_muted',
  186. /**
  187. * Indicates that the features of the participant has been changed.
  188. */
  189. PARTICIPANT_FEATURES_CHANGED = 'xmpp.participant_features_changed',
  190. // Designates an event indicating that a participant in the XMPP MUC has
  191. // advertised that they have video muted (or unmuted).
  192. PARTICIPANT_VIDEO_MUTED = 'xmpp.video_muted',
  193. // Designates an event indicating that the video type (e.g. 'camera' or
  194. // 'screen') for a participant has changed.
  195. // Note = currently this event fires every time we receive presence from
  196. // someone (regardless of whether or not the "video type" changed).
  197. PARTICIPANT_VIDEO_TYPE_CHANGED = 'xmpp.video_type',
  198. PASSWORD_REQUIRED = 'xmpp.password_required',
  199. /**
  200. * Event fired when we receive a self-presence with permissions.
  201. */
  202. PERMISSIONS_RECEIVED = 'xmpp.permissions_received',
  203. /**
  204. * Indicates that phone number changed.
  205. */
  206. PHONE_NUMBER_CHANGED = 'conference.phoneNumberChanged',
  207. PRESENCE_RECEIVED = 'xmpp.presence_received',
  208. PRESENCE_STATUS = 'xmpp.presence_status',
  209. // Designates an event indicating that a private XMPP message in the MUC was
  210. // received.
  211. PRIVATE_MESSAGE_RECEIVED = 'xmpp.private_message_received',
  212. PROMPT_FOR_LOGIN = 'xmpp.prompt_for_login',
  213. // Designates an event indicating that a reaction XMPP message in the MUC
  214. // was received.
  215. REACTION_RECEIVED = 'xmpp.reaction_received',
  216. // xmpp is connected and obtained user media
  217. READY_TO_JOIN = 'xmpp.ready_to_join',
  218. /**
  219. * Indicates that recording state changed.
  220. */
  221. RECORDER_STATE_CHANGED = 'xmpp.recorderStateChanged',
  222. // Designates an event indicating that we received statistics from a
  223. // participant in the MUC.
  224. REMOTE_STATS = 'xmpp.remote_stats',
  225. RESERVATION_ERROR = 'xmpp.room_reservation_error',
  226. ROOM_CONNECT_ERROR = 'xmpp.room_connect_error',
  227. ROOM_CONNECT_MEMBERS_ONLY_ERROR = 'xmpp.room_connect_error.members_only',
  228. ROOM_CONNECT_NOT_ALLOWED_ERROR = 'xmpp.room_connect_error.not_allowed',
  229. ROOM_DISCO_INFO_FAILED = 'xmpp.room_disco_info_failed',
  230. /**
  231. * Indicates that we have received a reply to our disco-info request for the room.
  232. */
  233. ROOM_DISCO_INFO_UPDATED = 'xmpp.room_disco_info_updated',
  234. ROOM_JOIN_ERROR = 'xmpp.room_join_error',
  235. /**
  236. * Indicates that max users limit has been reached.
  237. */
  238. ROOM_MAX_USERS_ERROR = 'xmpp.room_max_users_error',
  239. /**
  240. * Event fired when we receive a message related to room metadata.
  241. */
  242. ROOM_METADATA_EVENT = 'xmpp.room-metadata.event',
  243. /**
  244. * Event fired when we receive a message related to room metadata.
  245. */
  246. ROOM_METADATA_UPDATED = 'xmpp.room-metadata.updated',
  247. // Designates an event indicating that we sent an XMPP message to the MUC.
  248. SENDING_CHAT_MESSAGE = 'xmpp.sending_chat_message',
  249. // Designates an event indicating that we sent a private XMPP message to
  250. // a specific user of the muc.
  251. SENDING_PRIVATE_CHAT_MESSAGE = 'xmpp.sending_private_chat_message',
  252. /**
  253. * Event fired after receiving the confirmation about session accept.
  254. */
  255. SESSION_ACCEPT = 'xmpp.session_accept',
  256. /**
  257. * Event fired if we receive an error after sending the session accept.
  258. */
  259. SESSION_ACCEPT_ERROR = 'xmpp.session_accept_error',
  260. /**
  261. * Event fired when we do not get our 'session-accept' acknowledged by
  262. * Jicofo. It most likely means that there is serious problem with our
  263. * connection or XMPP server and we should reload the conference.
  264. *
  265. * We have seen that to happen in BOSH requests race condition when the BOSH
  266. * request table containing the 'session-accept' was discarded by Prosody.
  267. * Jicofo does send the RESULT immediately without any condition, so missing
  268. * packets means that most likely it has never seen our IQ.
  269. */
  270. SESSION_ACCEPT_TIMEOUT = 'xmpp.session_accept_timeout',
  271. SETTINGS_ERROR_RECEIVED = 'xmpp.settings_error_received',
  272. /**
  273. * Event fired when participant joins a meeting without audio.
  274. */
  275. SILENT_STATUS_CHANGED = 'xmpp.silent_status_changed',
  276. /**
  277. * Event fired after successful sending of jingle source-add.
  278. */
  279. SOURCE_ADD = 'xmpp.source_add',
  280. /**
  281. * Event fired after receiving an error sending of jingle source-add.
  282. */
  283. SOURCE_ADD_ERROR = 'xmpp.source_add_error',
  284. /**
  285. * Event fired after successful sending of jingle source-remove.
  286. */
  287. SOURCE_REMOVE = 'xmpp.source_remove',
  288. /**
  289. * Event fired after receiving an error sending of jingle source-remove.
  290. */
  291. SOURCE_REMOVE_ERROR = 'xmpp.source_remove_error',
  292. /**
  293. * Event fired when speaker stats update message is received.
  294. */
  295. SPEAKER_STATS_RECEIVED = 'xmpp.speaker_stats_received',
  296. // Designates an event indicating that the subject of the XMPP MUC has
  297. // changed.
  298. SUBJECT_CHANGED = 'xmpp.subject_changed',
  299. // FIXME: how does it belong to XMPP ? - it's detected by the PeerConnection
  300. // suspending detected
  301. SUSPEND_DETECTED = 'xmpp.suspend_detected',
  302. /**
  303. * Notifies for transcription status changes. The event provides the
  304. * following parameters to its listeners:
  305. *
  306. * @param {String} status - The new status.
  307. */
  308. TRANSCRIPTION_STATUS_CHANGED = 'xmpp.transcription_status_changed',
  309. /**
  310. * Event fired when 'transport-info' with new ICE candidates is received.
  311. */
  312. TRANSPORT_INFO = 'xmpp.transportinfo.jingle',
  313. // Designates an event indicating that the focus has asked us to disable our
  314. // camera.
  315. VIDEO_MUTED_BY_FOCUS = 'xmpp.video_muted_by_focus',
  316. /**
  317. * Indicates that video SIP GW state changed.
  318. *
  319. * @param {VideoSIPGWStatusConstants} status - Any of the following statuses:
  320. * STATUS_BUSY, STATUS_AVAILABLE or STATUS_UNDEFINED.
  321. */
  322. VIDEO_SIP_GW_AVAILABILITY_CHANGED = 'xmpp.videoSIPGWAvailabilityChanged',
  323. /**
  324. * Indicates that video SIP GW Session state changed.
  325. * The statuses are any of the following statuses:
  326. * STATE_ON, STATE_OFF, STATE_PENDING, STATE_RETRYING, STATE_FAILED.
  327. * {@see VideoSIPGWStateConstants}
  328. *
  329. * @param {options} event - {address, oldState, newState, displayName}.
  330. */
  331. VIDEO_SIP_GW_SESSION_STATE_CHANGED = 'xmpp.videoSIPGWSessionStateChanged',
  332. /**
  333. * Event indicating we have received a message from the visitors component.
  334. */
  335. VISITORS_MESSAGE = 'xmpp.visitors_message',
  336. /**
  337. * Event indicating that our request for promotion was rejected.
  338. */
  339. VISITORS_REJECTION = 'xmpp.visitors_rejection',
  340. }