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

XMPPEvents.js 7.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  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. CONFERENCE_SETUP_FAILED: 'xmpp.conference_setup_failed',
  25. /**
  26. * This event is triggered when the ICE connects for the first time.
  27. */
  28. CONNECTION_ESTABLISHED: 'xmpp.connection.connected',
  29. // Designates an event indicating that the connection to the XMPP server
  30. // failed.
  31. CONNECTION_FAILED: 'xmpp.connection.failed',
  32. // Designates an event indicating that the media (ICE) connection was
  33. // interrupted. This should go to the RTC module.
  34. CONNECTION_INTERRUPTED: 'xmpp.connection.interrupted',
  35. // Designates an event indicating that the media (ICE) connection was
  36. // restored. This should go to the RTC module.
  37. CONNECTION_RESTORED: 'xmpp.connection.restored',
  38. // Designates an event indicating that the media (ICE) connection failed.
  39. // This should go to the RTC module.
  40. CONNECTION_ICE_FAILED: 'xmpp.connection.ice.failed',
  41. // Designates an event indicating that the display name of a participant
  42. // has changed.
  43. DISPLAY_NAME_CHANGED: 'xmpp.display_name_changed',
  44. /**
  45. * Chat room instance have been added to Strophe.emuc plugin.
  46. */
  47. EMUC_ROOM_ADDED: 'xmpp.emuc_room_added',
  48. /**
  49. * Chat room instance have been removed from Strophe.emuc plugin.
  50. */
  51. EMUC_ROOM_REMOVED: 'xmpp.emuc_room_removed',
  52. ETHERPAD: 'xmpp.etherpad',
  53. FOCUS_DISCONNECTED: 'xmpp.focus_disconnected',
  54. FOCUS_LEFT: 'xmpp.focus_left',
  55. GRACEFUL_SHUTDOWN: 'xmpp.graceful_shutdown',
  56. /**
  57. * Event fired when 'transport-replace' Jingle message has been received,
  58. * before the new offer is set on the PeerConnection.
  59. */
  60. ICE_RESTARTING: 'rtc.ice_restarting',
  61. /* Event fired when XMPP error is returned to any request, it is meant to be
  62. * used to report 'signaling' errors to CallStats
  63. *
  64. * {
  65. * code: {XMPP error code}
  66. * reason: {XMPP error condition}
  67. * source = request.tree()
  68. * session = {JingleSession instance}
  69. * }
  70. */
  71. JINGLE_ERROR: 'xmpp.jingle_error',
  72. // Event fired when we have failed to set initial offer
  73. JINGLE_FATAL_ERROR: 'xmpp.jingle_fatal_error',
  74. // Designates an event indicating that we were kicked from the XMPP MUC.
  75. KICKED: 'xmpp.kicked',
  76. // Designates an event indicating that our role in the XMPP MUC has changed.
  77. LOCAL_ROLE_CHANGED: 'xmpp.localrole_changed',
  78. // Designates an event indicating that an XMPP message in the MUC was
  79. // received.
  80. MESSAGE_RECEIVED: 'xmpp.message_received',
  81. // Designates an event indicating that the XMPP MUC was destroyed.
  82. MUC_DESTROYED: 'xmpp.muc_destroyed',
  83. // Designates an event indicating that we have joined the XMPP MUC.
  84. MUC_JOINED: 'xmpp.muc_joined',
  85. // Designates an event indicating that a participant joined the XMPP MUC.
  86. MUC_MEMBER_JOINED: 'xmpp.muc_member_joined',
  87. // Designates an event indicating that a participant left the XMPP MUC.
  88. MUC_MEMBER_LEFT: 'xmpp.muc_member_left',
  89. // Designates an event indicating that local participant left the muc
  90. MUC_LEFT: 'xmpp.muc_left',
  91. // Designates an event indicating that the MUC role of a participant has
  92. // changed.
  93. MUC_ROLE_CHANGED: 'xmpp.muc_role_changed',
  94. // Designates an event indicating that the MUC has been locked or unlocked.
  95. MUC_LOCK_CHANGED: 'xmpp.muc_lock_changed',
  96. // Designates an event indicating that a participant in the XMPP MUC has
  97. // advertised that they have audio muted (or unmuted).
  98. PARTICIPANT_AUDIO_MUTED: 'xmpp.audio_muted',
  99. // Designates an event indicating that a participant in the XMPP MUC has
  100. // advertised that they have video muted (or unmuted).
  101. PARTICIPANT_VIDEO_MUTED: 'xmpp.video_muted',
  102. // Designates an event indicating that the video type (e.g. 'camera' or
  103. // 'screen') for a participant has changed.
  104. // Note: currently this event fires every time we receive presence from
  105. // someone (regardless of whether or not the "video type" changed).
  106. PARTICIPANT_VIDEO_TYPE_CHANGED: 'xmpp.video_type',
  107. /**
  108. * Indicates that the features of the participant has been changed.
  109. */
  110. PARTCIPANT_FEATURES_CHANGED: 'xmpp.partcipant_features_changed',
  111. PASSWORD_REQUIRED: 'xmpp.password_required',
  112. PEERCONNECTION_READY: 'xmpp.peerconnection_ready',
  113. /**
  114. * Indicates that phone number changed.
  115. */
  116. PHONE_NUMBER_CHANGED: 'conference.phoneNumberChanged',
  117. PRESENCE_STATUS: 'xmpp.presence_status',
  118. PROMPT_FOR_LOGIN: 'xmpp.prompt_for_login',
  119. // xmpp is connected and obtained user media
  120. READY_TO_JOIN: 'xmpp.ready_to_join',
  121. /**
  122. * Indicates that recording state changed.
  123. */
  124. RECORDER_STATE_CHANGED: 'xmpp.recorderStateChanged',
  125. // Designates an event indicating that we received statistics from a
  126. // participant in the MUC.
  127. REMOTE_STATS: 'xmpp.remote_stats',
  128. RESERVATION_ERROR: 'xmpp.room_reservation_error',
  129. ROOM_CONNECT_ERROR: 'xmpp.room_connect_error',
  130. ROOM_CONNECT_NOT_ALLOWED_ERROR: 'xmpp.room_connect_error.not_allowed',
  131. ROOM_JOIN_ERROR: 'xmpp.room_join_error',
  132. /**
  133. * Indicates that max users limit has been reached.
  134. */
  135. ROOM_MAX_USERS_ERROR: 'xmpp.room_max_users_error',
  136. // Designates an event indicating that we sent an XMPP message to the MUC.
  137. SENDING_CHAT_MESSAGE: 'xmpp.sending_chat_message',
  138. /**
  139. * Event fired when we do not get our 'session-accept' acknowledged by
  140. * Jicofo. It most likely means that there is serious problem with our
  141. * connection or XMPP server and we should reload the conference.
  142. *
  143. * We have seen that to happen in BOSH requests race condition when the BOSH
  144. * request table containing the 'session-accept' was discarded by Prosody.
  145. * Jicofo does send the RESULT immediately without any condition, so missing
  146. * packets means that most likely it has never seen our IQ.
  147. */
  148. SESSION_ACCEPT_TIMEOUT: 'xmpp.session_accept_timeout',
  149. // Designates an event indicating that we should join the conference with
  150. // audio and/or video muted.
  151. START_MUTED_FROM_FOCUS: 'xmpp.start_muted_from_focus',
  152. // Designates an event indicating that the subject of the XMPP MUC has
  153. // changed.
  154. SUBJECT_CHANGED: 'xmpp.subject_changed',
  155. // FIXME: how does it belong to XMPP ? - it's detected by the PeerConnection
  156. // suspending detected
  157. SUSPEND_DETECTED: 'xmpp.suspend_detected',
  158. /**
  159. * Event fired when 'transport-info' with new ICE candidates is received.
  160. */
  161. TRANSPORT_INFO: 'xmpp.transportinfo.jingle',
  162. /**
  163. * Indicates that video SIP GW state changed.
  164. *
  165. * @param {VideoSIPGWConstants} status - Any of the following statuses:
  166. * STATUS_BUSY, STATUS_AVAILABLE or STATUS_UNDEFINED.
  167. */
  168. VIDEO_SIP_GW_AVAILABILITY_CHANGED: 'xmpp.videoSIPGWAvailabilityChanged',
  169. // Designates an event indicating that the local ICE connection state has
  170. // changed.
  171. ICE_CONNECTION_STATE_CHANGED: 'xmpp.ice_connection_state_changed'
  172. };
  173. module.exports = XMPPEvents;