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.

RTCEvents.js 3.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. const RTCEvents = {
  2. /**
  3. * Indicates error while create answer call.
  4. */
  5. CREATE_ANSWER_FAILED: 'rtc.create_answer_failed',
  6. /**
  7. * Indicates error while create offer call.
  8. */
  9. CREATE_OFFER_FAILED: 'rtc.create_offer_failed',
  10. RTC_READY: 'rtc.ready',
  11. DATA_CHANNEL_OPEN: 'rtc.data_channel_open',
  12. ENDPOINT_CONN_STATUS_CHANGED: 'rtc.endpoint_conn_status_changed',
  13. DOMINANT_SPEAKER_CHANGED: 'rtc.dominant_speaker_changed',
  14. LASTN_ENDPOINT_CHANGED: 'rtc.lastn_endpoint_changed',
  15. IS_SELECTED_CHANGED: 'rtc.is_selected_change',
  16. /**
  17. * Event emitted when {@link RTC.setLastN} method is called to update with
  18. * the new value set.
  19. * The first argument is the value passed to {@link RTC.setLastN}.
  20. */
  21. LASTN_VALUE_CHANGED: 'rtc.lastn_value_changed',
  22. /**
  23. * Event emitted when ssrc for a local track is extracted and stored
  24. * in {@link TraceablePeerConnection}.
  25. * @param {JitsiLocalTrack} track which ssrc was updated
  26. * @param {string} ssrc that was stored
  27. */
  28. LOCAL_TRACK_SSRC_UPDATED: 'rtc.local_track_ssrc_updated',
  29. AVAILABLE_DEVICES_CHANGED: 'rtc.available_devices_changed',
  30. TRACK_ATTACHED: 'rtc.track_attached',
  31. /**
  32. * Event fired when we remote track is added to the conference.
  33. * 1st event argument is the added <tt>JitsiRemoteTrack</tt> instance.
  34. **/
  35. REMOTE_TRACK_ADDED: 'rtc.remote_track_added',
  36. // FIXME get rid of this event in favour of NO_DATA_FROM_SOURCE event
  37. // (currently implemented for local tracks only)
  38. REMOTE_TRACK_MUTE: 'rtc.remote_track_mute',
  39. /**
  40. * Indicates that the remote track has been removed from the conference.
  41. * 1st event argument is the removed {@link JitsiRemoteTrack} instance.
  42. */
  43. REMOTE_TRACK_REMOVED: 'rtc.remote_track_removed',
  44. // FIXME get rid of this event in favour of NO_DATA_FROM_SOURCE event
  45. // (currently implemented for local tracks only)
  46. REMOTE_TRACK_UNMUTE: 'rtc.remote_track_unmute',
  47. /**
  48. * Indicates error while set local description.
  49. */
  50. SET_LOCAL_DESCRIPTION_FAILED: 'rtc.set_local_description_failed',
  51. /**
  52. * Indicates error while set remote description.
  53. */
  54. SET_REMOTE_DESCRIPTION_FAILED: 'rtc.set_remote_description_failed',
  55. AUDIO_OUTPUT_DEVICE_CHANGED: 'rtc.audio_output_device_changed',
  56. DEVICE_LIST_CHANGED: 'rtc.device_list_changed',
  57. DEVICE_LIST_AVAILABLE: 'rtc.device_list_available',
  58. /**
  59. * Indicates that a message from another participant is received on
  60. * data channel.
  61. */
  62. ENDPOINT_MESSAGE_RECEIVED: 'rtc.endpoint_message_received',
  63. /**
  64. * Designates an event indicating that the local ICE username fragment of
  65. * the jingle session has changed.
  66. * The first argument of the vent is <tt>TraceablePeerConnection</tt> which
  67. * is the source of the event.
  68. * The second argument is the actual "ufrag" string.
  69. */
  70. LOCAL_UFRAG_CHANGED: 'rtc.local_ufrag_changed',
  71. /**
  72. * Designates an event indicating that the local ICE username fragment of
  73. * the jingle session has changed.
  74. * The first argument of the vent is <tt>TraceablePeerConnection</tt> which
  75. * is the source of the event.
  76. * The second argument is the actual "ufrag" string.
  77. */
  78. REMOTE_UFRAG_CHANGED: 'rtc.remote_ufrag_changed'
  79. };
  80. module.exports = RTCEvents;