Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. const 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. BRIDGE_DOWN: 'xmpp.bridge_down',
  11. /**
  12. * Triggered when 'session-accept' is received from the responder.
  13. */
  14. CALL_ACCEPTED: 'xmpp.callaccepted.jingle',
  15. // Designates an event indicating that an offer (e.g. Jingle
  16. // session-initiate) was received.
  17. CALL_INCOMING: 'xmpp.callincoming.jingle',
  18. // Triggered when Jicofo kills our media session, this can happen while
  19. // we're still in the MUC, when it decides to terminate the media session.
  20. // For example when the session is idle for too long, because we're the only
  21. // person in the conference room.
  22. CALL_ENDED: 'xmpp.callended.jingle',
  23. CHAT_ERROR_RECEIVED: 'xmpp.chat_error_received',
  24. // The conference properties (as advertised by jicofo) have changed
  25. CONFERENCE_PROPERTIES_CHANGED: 'xmpp.conference_properties_changed',
  26. /**
  27. * This event is triggered when the ICE connects for the first time.
  28. */
  29. CONNECTION_ESTABLISHED: 'xmpp.connection.connected',
  30. // Designates an event indicating that the connection to the XMPP server
  31. // failed.
  32. CONNECTION_FAILED: 'xmpp.connection.failed',
  33. // Designates an event indicating that the media (ICE) connection was
  34. // interrupted. This should go to the RTC module.
  35. CONNECTION_INTERRUPTED: 'xmpp.connection.interrupted',
  36. // Designates an event indicating that the media (ICE) connection was
  37. // restored. This should go to the RTC module.
  38. CONNECTION_RESTORED: 'xmpp.connection.restored',
  39. // Designates an event indicating that the media (ICE) connection failed.
  40. // This should go to the RTC module.
  41. CONNECTION_ICE_FAILED: 'xmpp.connection.ice.failed',
  42. /**
  43. * Designates an event indicating connection status changes.
  44. */
  45. CONNECTION_STATUS_CHANGED: 'xmpp.connection.status.changed',
  46. // Designates an event indicating that the display name of a participant
  47. // has changed.
  48. DISPLAY_NAME_CHANGED: 'xmpp.display_name_changed',
  49. /**
  50. * Chat room instance have been added to Strophe.emuc plugin.
  51. */
  52. EMUC_ROOM_ADDED: 'xmpp.emuc_room_added',
  53. /**
  54. * Chat room instance have been removed from Strophe.emuc plugin.
  55. */
  56. EMUC_ROOM_REMOVED: 'xmpp.emuc_room_removed',
  57. ETHERPAD: 'xmpp.etherpad',
  58. FOCUS_DISCONNECTED: 'xmpp.focus_disconnected',
  59. FOCUS_LEFT: 'xmpp.focus_left',
  60. GRACEFUL_SHUTDOWN: 'xmpp.graceful_shutdown',
  61. /**
  62. * Event fired when 'transport-replace' Jingle message has been received,
  63. * before the new offer is set on the PeerConnection.
  64. */
  65. ICE_RESTARTING: 'rtc.ice_restarting',
  66. /**
  67. * Event fired after the 'transport-replace' message has been processed
  68. * and the new offer has been set successfully.
  69. */
  70. ICE_RESTART_SUCCESS: 'rtc.ice_restart_success',
  71. /**
  72. * Designates an event indicating that we were kicked from the XMPP MUC.
  73. * @param {boolean} isSelfPresence - whether it is for local participant
  74. * or another participant.
  75. * @param {string} actorJid - the jid of the participant who was initator
  76. * of the kick.
  77. * @param {?string} participantJid - when it is not a kick for local participant,
  78. * this is the jid of the participant which was kicked.
  79. */
  80. KICKED: 'xmpp.kicked',
  81. // Designates an event indicating that our role in the XMPP MUC has changed.
  82. LOCAL_ROLE_CHANGED: 'xmpp.localrole_changed',
  83. // Designates an event indicating that an XMPP message in the MUC was
  84. // received.
  85. MESSAGE_RECEIVED: 'xmpp.message_received',
  86. // Designates an event indicating that a private XMPP message in the MUC was
  87. // received.
  88. PRIVATE_MESSAGE_RECEIVED: 'xmpp.private_message_received',
  89. // Designates an event indicating that a bot participant type had changed
  90. MUC_MEMBER_BOT_TYPE_CHANGED: 'xmpp.muc_member_bot_type_changed',
  91. // Designates an event indicating that the XMPP MUC was destroyed.
  92. MUC_DESTROYED: 'xmpp.muc_destroyed',
  93. // Designates an event indicating that we have joined the XMPP MUC.
  94. MUC_JOINED: 'xmpp.muc_joined',
  95. // Designates an event indicating that a participant joined the XMPP MUC.
  96. MUC_MEMBER_JOINED: 'xmpp.muc_member_joined',
  97. // Designates an event indicating that a participant left the XMPP MUC.
  98. MUC_MEMBER_LEFT: 'xmpp.muc_member_left',
  99. // Designates an event indicating that local participant left the muc
  100. MUC_LEFT: 'xmpp.muc_left',
  101. // Designates an event indicating that the MUC role of a participant has
  102. // changed.
  103. MUC_ROLE_CHANGED: 'xmpp.muc_role_changed',
  104. // Designates an event indicating that the MUC has been locked or unlocked.
  105. MUC_LOCK_CHANGED: 'xmpp.muc_lock_changed',
  106. // Designates an event indicating that a participant in the XMPP MUC has
  107. // advertised that they have audio muted (or unmuted).
  108. PARTICIPANT_AUDIO_MUTED: 'xmpp.audio_muted',
  109. // Designates an event indicating that a participant in the XMPP MUC has
  110. // advertised that they have video muted (or unmuted).
  111. PARTICIPANT_VIDEO_MUTED: 'xmpp.video_muted',
  112. // Designates an event indicating that the video type (e.g. 'camera' or
  113. // 'screen') for a participant has changed.
  114. // Note: currently this event fires every time we receive presence from
  115. // someone (regardless of whether or not the "video type" changed).
  116. PARTICIPANT_VIDEO_TYPE_CHANGED: 'xmpp.video_type',
  117. /**
  118. * Indicates that the features of the participant has been changed.
  119. */
  120. PARTCIPANT_FEATURES_CHANGED: 'xmpp.partcipant_features_changed',
  121. PASSWORD_REQUIRED: 'xmpp.password_required',
  122. PEERCONNECTION_READY: 'xmpp.peerconnection_ready',
  123. /**
  124. * Indicates that phone number changed.
  125. */
  126. PHONE_NUMBER_CHANGED: 'conference.phoneNumberChanged',
  127. PRESENCE_RECEIVED: 'xmpp.presence_received',
  128. PRESENCE_STATUS: 'xmpp.presence_status',
  129. PROMPT_FOR_LOGIN: 'xmpp.prompt_for_login',
  130. // xmpp is connected and obtained user media
  131. READY_TO_JOIN: 'xmpp.ready_to_join',
  132. /**
  133. * Indicates that recording state changed.
  134. */
  135. RECORDER_STATE_CHANGED: 'xmpp.recorderStateChanged',
  136. // Designates an event indicating that we received statistics from a
  137. // participant in the MUC.
  138. REMOTE_STATS: 'xmpp.remote_stats',
  139. /**
  140. * Indicates that the offer / answer renegotiation has failed.
  141. */
  142. RENEGOTIATION_FAILED: 'xmpp.renegotiation_failed',
  143. RESERVATION_ERROR: 'xmpp.room_reservation_error',
  144. ROOM_CONNECT_ERROR: 'xmpp.room_connect_error',
  145. ROOM_CONNECT_NOT_ALLOWED_ERROR: 'xmpp.room_connect_error.not_allowed',
  146. ROOM_JOIN_ERROR: 'xmpp.room_join_error',
  147. /**
  148. * Indicates that max users limit has been reached.
  149. */
  150. ROOM_MAX_USERS_ERROR: 'xmpp.room_max_users_error',
  151. // Designates an event indicating that we sent an XMPP message to the MUC.
  152. SENDING_CHAT_MESSAGE: 'xmpp.sending_chat_message',
  153. // Designates an event indicating that we sent a private XMPP message to
  154. // a specific user of the muc.
  155. SENDING_PRIVATE_CHAT_MESSAGE: 'xmpp.sending_private_chat_message',
  156. /**
  157. * Event fired when we do not get our 'session-accept' acknowledged by
  158. * Jicofo. It most likely means that there is serious problem with our
  159. * connection or XMPP server and we should reload the conference.
  160. *
  161. * We have seen that to happen in BOSH requests race condition when the BOSH
  162. * request table containing the 'session-accept' was discarded by Prosody.
  163. * Jicofo does send the RESULT immediately without any condition, so missing
  164. * packets means that most likely it has never seen our IQ.
  165. */
  166. SESSION_ACCEPT_TIMEOUT: 'xmpp.session_accept_timeout',
  167. /**
  168. * Event fired when speaker stats update message is received.
  169. */
  170. SPEAKER_STATS_RECEIVED: 'xmpp.speaker_stats_received',
  171. /**
  172. * Event fired when conference creation timestamp is received.
  173. */
  174. CONFERENCE_TIMESTAMP_RECEIVED: 'xmpp.conference_timestamp_received',
  175. // Designates an event indicating that we should join the conference with
  176. // audio and/or video muted.
  177. START_MUTED_FROM_FOCUS: 'xmpp.start_muted_from_focus',
  178. // Designates an event indicating that the subject of the XMPP MUC has
  179. // changed.
  180. SUBJECT_CHANGED: 'xmpp.subject_changed',
  181. // FIXME: how does it belong to XMPP ? - it's detected by the PeerConnection
  182. // suspending detected
  183. SUSPEND_DETECTED: 'xmpp.suspend_detected',
  184. /**
  185. * Notifies for transcription status changes. The event provides the
  186. * following parameters to its listeners:
  187. *
  188. * @param {String} status - The new status.
  189. */
  190. TRANSCRIPTION_STATUS_CHANGED: 'xmpp.transcription_status_changed',
  191. /**
  192. * Event fired when 'transport-info' with new ICE candidates is received.
  193. */
  194. TRANSPORT_INFO: 'xmpp.transportinfo.jingle',
  195. /**
  196. * Indicates that video SIP GW state changed.
  197. *
  198. * @param {VideoSIPGWConstants} status - Any of the following statuses:
  199. * STATUS_BUSY, STATUS_AVAILABLE or STATUS_UNDEFINED.
  200. */
  201. VIDEO_SIP_GW_AVAILABILITY_CHANGED: 'xmpp.videoSIPGWAvailabilityChanged',
  202. /**
  203. * Indicates that video SIP GW Session state changed.
  204. * The statuses are any of the following statuses:
  205. * STATE_ON, STATE_OFF, STATE_PENDING, STATE_RETRYING, STATE_FAILED.
  206. * {@see VideoSIPGWConstants}
  207. *
  208. * @param {options} event - {address, oldState, newState, displayName}.
  209. */
  210. VIDEO_SIP_GW_SESSION_STATE_CHANGED:
  211. 'xmpp.videoSIPGWSessionStateChanged',
  212. // Designates an event indicating that the local ICE connection state has
  213. // changed.
  214. ICE_CONNECTION_STATE_CHANGED: 'xmpp.ice_connection_state_changed',
  215. /**
  216. * Event which is emitted when the body in an XMPP message in the MUC
  217. * contains JSON
  218. */
  219. JSON_MESSAGE_RECEIVED: 'xmmp.json_message_received'
  220. };
  221. module.exports = XMPPEvents;