Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

XMPPEvents.js 8.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. var 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. // Designates an event indicating that an offer (e.g. Jingle
  12. // session-initiate) was received.
  13. CALL_INCOMING: "xmpp.callincoming.jingle",
  14. // Triggered when Jicofo kills our media session, this can happen while
  15. // we're still in the MUC, when it decides to terminate the media session.
  16. // For example when the session is idle for too long, because we're the only
  17. // person in the conference room.
  18. CALL_ENDED: "xmpp.callended.jingle",
  19. CHAT_ERROR_RECEIVED: "xmpp.chat_error_received",
  20. CONFERENCE_SETUP_FAILED: "xmpp.conference_setup_failed",
  21. // Designates an event indicating that the connection to the XMPP server
  22. // failed.
  23. CONNECTION_FAILED: "xmpp.connection.failed",
  24. // Designates an event indicating that the media (ICE) connection was
  25. // interrupted. This should go to the RTC module.
  26. CONNECTION_INTERRUPTED: "xmpp.connection.interrupted",
  27. // Designates an event indicating that the media (ICE) connection was
  28. // restored. This should go to the RTC module.
  29. CONNECTION_RESTORED: "xmpp.connection.restored",
  30. // Designates an event indicating that the media (ICE) connection failed.
  31. // This should go to the RTC module.
  32. CONNECTION_ICE_FAILED: "xmpp.connection.ice.failed",
  33. // TODO: only used in a hack, should probably be removed.
  34. CREATE_ANSWER_ERROR: 'xmpp.create_answer_error',
  35. /**
  36. * Indicates error while create answer call.
  37. */
  38. CREATE_ANSWER_FAILED: "xmpp.create_answer_failed",
  39. /**
  40. * Indicates error while create offer call.
  41. */
  42. CREATE_OFFER_FAILED: "xmpp.create_offer_failed",
  43. // Designates an event indicating that the display name of a participant
  44. // has changed.
  45. DISPLAY_NAME_CHANGED: "xmpp.display_name_changed",
  46. DISPOSE_CONFERENCE: "xmpp.dispose_conference",
  47. ETHERPAD: "xmpp.etherpad",
  48. FOCUS_DISCONNECTED: 'xmpp.focus_disconnected',
  49. FOCUS_LEFT: "xmpp.focus_left",
  50. GRACEFUL_SHUTDOWN: "xmpp.graceful_shutdown",
  51. /**
  52. * Event fired when 'transport-replace' Jingle message has been received,
  53. * before the new offer is set on the PeerConnection.
  54. */
  55. ICE_RESTARTING: "rtc.ice_restarting",
  56. /* Event fired when XMPP error is returned to any request, it is meant to be
  57. * used to report 'signaling' errors to CallStats
  58. *
  59. * {
  60. * code: {XMPP error code}
  61. * reason: {XMPP error condition}
  62. * source = request.tree()
  63. * session = {JingleSession instance}
  64. * }
  65. */
  66. JINGLE_ERROR: 'xmpp.jingle_error',
  67. // Event fired when we have failed to set initial offer
  68. JINGLE_FATAL_ERROR: 'xmpp.jingle_fatal_error',
  69. // Designates an event indicating that we were kicked from the XMPP MUC.
  70. KICKED: "xmpp.kicked",
  71. // Designates an event indicating that our role in the XMPP MUC has changed.
  72. LOCAL_ROLE_CHANGED: "xmpp.localrole_changed",
  73. // Designates an event indicating that an XMPP message in the MUC was
  74. // received.
  75. MESSAGE_RECEIVED: "xmpp.message_received",
  76. // Designates an event indicating that the XMPP MUC was destroyed.
  77. MUC_DESTROYED: "xmpp.muc_destroyed",
  78. // Designates an event indicating that we have joined the XMPP MUC.
  79. MUC_JOINED: "xmpp.muc_joined",
  80. // Designates an event indicating that a participant joined the XMPP MUC.
  81. MUC_MEMBER_JOINED: "xmpp.muc_member_joined",
  82. // Designates an event indicating that a participant left the XMPP MUC.
  83. MUC_MEMBER_LEFT: "xmpp.muc_member_left",
  84. // Designates an event indicating that the MUC role of a participant has
  85. // changed.
  86. MUC_ROLE_CHANGED: "xmpp.muc_role_changed",
  87. // Designates an event indicating that the MUC has been locked or unlocked.
  88. MUC_LOCK_CHANGED: "xmpp.muc_lock_changed",
  89. // Designates an event indicating that a participant in the XMPP MUC has
  90. // advertised that they have audio muted (or unmuted).
  91. PARTICIPANT_AUDIO_MUTED: "xmpp.audio_muted",
  92. // Designates an event indicating that a participant in the XMPP MUC has
  93. // advertised that they have video muted (or unmuted).
  94. PARTICIPANT_VIDEO_MUTED: "xmpp.video_muted",
  95. // Designates an event indicating that the video type (e.g. 'camera' or
  96. // 'screen') for a participant has changed.
  97. // Note: currently this event fires every time we receive presence from
  98. // someone (regardless of whether or not the "video type" changed).
  99. PARTICIPANT_VIDEO_TYPE_CHANGED: "xmpp.video_type",
  100. PASSWORD_REQUIRED: "xmpp.password_required",
  101. PEERCONNECTION_READY: "xmpp.peerconnection_ready",
  102. /**
  103. * Indicates that phone number changed.
  104. */
  105. PHONE_NUMBER_CHANGED: "conference.phoneNumberChanged",
  106. PRESENCE_STATUS: "xmpp.presence_status",
  107. PROMPT_FOR_LOGIN: 'xmpp.prompt_for_login',
  108. // xmpp is connected and obtained user media
  109. READY_TO_JOIN: 'xmpp.ready_to_join',
  110. /**
  111. * Indicates that recording state changed.
  112. */
  113. RECORDER_STATE_CHANGED: "xmpp.recorderStateChanged",
  114. // Designates an event indicating that we received statistics from a
  115. // participant in the MUC.
  116. REMOTE_STATS: "xmpp.remote_stats",
  117. /**
  118. * Event fired when we remote track is added to the conference.
  119. * The following structure is passed as an argument:
  120. * {
  121. * stream: the WebRTC MediaStream instance
  122. * track: the WebRTC MediaStreamTrack
  123. * mediaType: the MediaType instance
  124. * owner: the MUC JID of the stream owner
  125. * muted: a boolean indicating initial 'muted' status of the track or
  126. * 'null' if unknown
  127. **/
  128. REMOTE_TRACK_ADDED: "xmpp.remote_track_added",
  129. /**
  130. * Indicates that the remote track has been removed from the conference.
  131. * 1st event argument is the ID of the parent WebRTC stream to which
  132. * the track being removed belongs to.
  133. * 2nd event argument is the ID of the removed track.
  134. */
  135. REMOTE_TRACK_REMOVED: "xmpp.remote_track_removed",
  136. RESERVATION_ERROR: "xmpp.room_reservation_error",
  137. ROOM_CONNECT_ERROR: 'xmpp.room_connect_error',
  138. ROOM_CONNECT_NOT_ALLOWED_ERROR: 'xmpp.room_connect_error.not_allowed',
  139. ROOM_JOIN_ERROR: 'xmpp.room_join_error',
  140. /**
  141. * Indicates that max users limit has been reached.
  142. */
  143. ROOM_MAX_USERS_ERROR: "xmpp.room_max_users_error",
  144. // Designates an event indicating that we sent an XMPP message to the MUC.
  145. SENDING_CHAT_MESSAGE: "xmpp.sending_chat_message",
  146. /**
  147. * Indicates that the local sendrecv streams in local SDP are changed.
  148. */
  149. SENDRECV_STREAMS_CHANGED: "xmpp.sendrecv_streams_changed",
  150. /**
  151. * Event fired when we do not get our 'session-accept' acknowledged by
  152. * Jicofo. It most likely means that there is serious problem with our
  153. * connection or XMPP server and we should reload the conference.
  154. *
  155. * We have seen that to happen in BOSH requests race condition when the BOSH
  156. * request table containing the 'session-accept' was discarded by Prosody.
  157. * Jicofo does send the RESULT immediately without any condition, so missing
  158. * packets means that most likely it has never seen our IQ.
  159. */
  160. SESSION_ACCEPT_TIMEOUT: "xmpp.session_accept_timeout",
  161. // TODO: only used in a hack, should probably be removed.
  162. SET_LOCAL_DESCRIPTION_ERROR: 'xmpp.set_local_description_error',
  163. /**
  164. * Indicates error while set local description.
  165. */
  166. SET_LOCAL_DESCRIPTION_FAILED: "xmpp.set_local_description_failed",
  167. // TODO: only used in a hack, should probably be removed.
  168. SET_REMOTE_DESCRIPTION_ERROR: 'xmpp.set_remote_description_error',
  169. /**
  170. * Indicates error while set remote description.
  171. */
  172. SET_REMOTE_DESCRIPTION_FAILED: "xmpp.set_remote_description_failed",
  173. // Designates an event indicating that we should join the conference with
  174. // audio and/or video muted.
  175. START_MUTED_FROM_FOCUS: "xmpp.start_muted_from_focus",
  176. // Designates an event indicating that the subject of the XMPP MUC has
  177. // changed.
  178. SUBJECT_CHANGED: "xmpp.subject_changed",
  179. // Designates an event indicating that the local ICE username fragment of
  180. // the jingle session has changed.
  181. LOCAL_UFRAG_CHANGED: "xmpp.local_ufrag_changed",
  182. // Designates an event indicating that the local ICE username fragment of
  183. // the jingle session has changed.
  184. REMOTE_UFRAG_CHANGED: "xmpp.remote_ufrag_changed"
  185. };
  186. module.exports = XMPPEvents;