Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

XMPPEvents.js 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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. CHAT_ERROR_RECEIVED: "xmpp.chat_error_received",
  15. CONFERENCE_SETUP_FAILED: "xmpp.conference_setup_failed",
  16. // Designates an event indicating that the connection to the XMPP server
  17. // failed.
  18. CONNECTION_FAILED: "xmpp.connection.failed",
  19. // Designates an event indicating that the media (ICE) connection was
  20. // interrupted. This should go to the RTC module.
  21. CONNECTION_INTERRUPTED: "xmpp.connection.interrupted",
  22. // Designates an event indicating that the media (ICE) connection was
  23. // restored. This should go to the RTC module.
  24. CONNECTION_RESTORED: "xmpp.connection.restored",
  25. // TODO: only used in a hack, should probably be removed.
  26. CREATE_ANSWER_ERROR: 'xmpp.create_answer_error',
  27. /**
  28. * Indicates error while create answer call.
  29. */
  30. CREATE_ANSWER_FAILED: "xmpp.create_answer_failed",
  31. /**
  32. * Indicates error while create offer call.
  33. */
  34. CREATE_OFFER_FAILED: "xmpp.create_offer_failed",
  35. // Designates an event indicating that the display name of a participant
  36. // has changed.
  37. DISPLAY_NAME_CHANGED: "xmpp.display_name_changed",
  38. DISPOSE_CONFERENCE: "xmpp.dispose_conference",
  39. ETHERPAD: "xmpp.etherpad",
  40. FOCUS_DISCONNECTED: 'xmpp.focus_disconnected',
  41. FOCUS_LEFT: "xmpp.focus_left",
  42. GRACEFUL_SHUTDOWN: "xmpp.graceful_shutdown",
  43. /* Event fired when XMPP error is returned to any request, it is meant to be
  44. * used to report 'signaling' errors to CallStats
  45. *
  46. * {
  47. * code: {XMPP error code}
  48. * reason: {XMPP error condition}
  49. * source = request.tree()
  50. * session = {JingleSession instance}
  51. * }
  52. */
  53. JINGLE_ERROR: 'xmpp.jingle_error',
  54. // Event fired when we have failed to set initial offer
  55. JINGLE_FATAL_ERROR: 'xmpp.jingle_fatal_error',
  56. // Designates an event indicating that we were kicked from the XMPP MUC.
  57. KICKED: "xmpp.kicked",
  58. // Designates an event indicating that our role in the XMPP MUC has changed.
  59. LOCAL_ROLE_CHANGED: "xmpp.localrole_changed",
  60. // Designates an event indicating that an XMPP message in the MUC was
  61. // received.
  62. MESSAGE_RECEIVED: "xmpp.message_received",
  63. // Designates an event indicating that the XMPP MUC was destroyed.
  64. MUC_DESTROYED: "xmpp.muc_destroyed",
  65. // Designates an event indicating that we have joined the XMPP MUC.
  66. MUC_JOINED: "xmpp.muc_joined",
  67. // Designates an event indicating that a participant joined the XMPP MUC.
  68. MUC_MEMBER_JOINED: "xmpp.muc_member_joined",
  69. // Designates an event indicating that a participant left the XMPP MUC.
  70. MUC_MEMBER_LEFT: "xmpp.muc_member_left",
  71. // Designates an event indicating that the MUC role of a participant has
  72. // changed.
  73. MUC_ROLE_CHANGED: "xmpp.muc_role_changed",
  74. // Designates an event indicating that a participant in the XMPP MUC has
  75. // advertised that they have audio muted (or unmuted).
  76. PARTICIPANT_AUDIO_MUTED: "xmpp.audio_muted",
  77. // Designates an event indicating that a participant in the XMPP MUC has
  78. // advertised that they have video muted (or unmuted).
  79. PARTICIPANT_VIDEO_MUTED: "xmpp.video_muted",
  80. // Designates an event indicating that the video type (e.g. 'camera' or
  81. // 'screen') for a participant has changed.
  82. // Note: currently this event fires every time we receive presence from
  83. // someone (regardless of whether or not the "video type" changed).
  84. PARTICIPANT_VIDEO_TYPE_CHANGED: "xmpp.video_type",
  85. PASSWORD_REQUIRED: "xmpp.password_required",
  86. PEERCONNECTION_READY: "xmpp.peerconnection_ready",
  87. /**
  88. * Indicates that phone number changed.
  89. */
  90. PHONE_NUMBER_CHANGED: "conference.phoneNumberChanged",
  91. PRESENCE_STATUS: "xmpp.presence_status",
  92. PROMPT_FOR_LOGIN: 'xmpp.prompt_for_login',
  93. // xmpp is connected and obtained user media
  94. READY_TO_JOIN: 'xmpp.ready_to_join',
  95. /**
  96. * Indicates that recording state changed.
  97. */
  98. RECORDER_STATE_CHANGED: "xmpp.recorderStateChanged",
  99. // Designates an event indicating that we received statistics from a
  100. // participant in the MUC.
  101. REMOTE_STATS: "xmpp.remote_stats",
  102. /**
  103. * Event fired when we remote track is added to the conference.
  104. * The following structure is passed as an argument:
  105. * {
  106. * stream: the WebRTC MediaStream instance
  107. * track: the WebRTC MediaStreamTrack
  108. * mediaType: the MediaType instance
  109. * owner: the MUC JID of the stream owner
  110. * muted: a boolean indicating initial 'muted' status of the track or
  111. * 'null' if unknown
  112. **/
  113. REMOTE_TRACK_ADDED: "xmpp.remote_track_added",
  114. /**
  115. * Indicates that the remote track has been removed from the conference.
  116. * 1st event argument is the ID of the parent WebRTC stream to which
  117. * the track being removed belongs to.
  118. * 2nd event argument is the ID of the removed track.
  119. */
  120. REMOTE_TRACK_REMOVED: "xmpp.remote_track_removed",
  121. RESERVATION_ERROR: "xmpp.room_reservation_error",
  122. ROOM_CONNECT_ERROR: 'xmpp.room_connect_error',
  123. ROOM_JOIN_ERROR: 'xmpp.room_join_error',
  124. /**
  125. * Indicates that max users limit has been reached.
  126. */
  127. ROOM_MAX_USERS_ERROR: "xmpp.room_max_users_error",
  128. // Designates an event indicating that we sent an XMPP message to the MUC.
  129. SENDING_CHAT_MESSAGE: "xmpp.sending_chat_message",
  130. /**
  131. * Indicates that the local sendrecv streams in local SDP are changed.
  132. */
  133. SENDRECV_STREAMS_CHANGED: "xmpp.sendrecv_streams_changed",
  134. // TODO: only used in a hack, should probably be removed.
  135. SET_LOCAL_DESCRIPTION_ERROR: 'xmpp.set_local_description_error',
  136. /**
  137. * Indicates error while set local description.
  138. */
  139. SET_LOCAL_DESCRIPTION_FAILED: "xmpp.set_local_description_failed",
  140. // TODO: only used in a hack, should probably be removed.
  141. SET_REMOTE_DESCRIPTION_ERROR: 'xmpp.set_remote_description_error',
  142. /**
  143. * Indicates error while set remote description.
  144. */
  145. SET_REMOTE_DESCRIPTION_FAILED: "xmpp.set_remote_description_failed",
  146. // Designates an event indicating that we should join the conference with
  147. // audio and/or video muted.
  148. START_MUTED_FROM_FOCUS: "xmpp.start_muted_from_focus",
  149. // Designates an event indicating that the subject of the XMPP MUC has
  150. // changed.
  151. SUBJECT_CHANGED: "xmpp.subject_changed"
  152. };
  153. module.exports = XMPPEvents;