Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

RTCEvents.js 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. DATA_CHANNEL_OPEN: 'rtc.data_channel_open',
  11. ENDPOINT_CONN_STATUS_CHANGED: 'rtc.endpoint_conn_status_changed',
  12. DOMINANT_SPEAKER_CHANGED: 'rtc.dominant_speaker_changed',
  13. LASTN_ENDPOINT_CHANGED: 'rtc.lastn_endpoint_changed',
  14. /**
  15. * Event emitted when the user granted a permission for the camera / mic.
  16. * Used to keep track of the granted permissions on browsers which don't
  17. * support the Permissions API.
  18. */
  19. GRANTED_PERMISSIONS: 'rtc.granted_permissions',
  20. IS_SELECTED_CHANGED: 'rtc.is_selected_change',
  21. /**
  22. * Event emitted when {@link RTC.setLastN} method is called to update with
  23. * the new value set.
  24. * The first argument is the value passed to {@link RTC.setLastN}.
  25. */
  26. LASTN_VALUE_CHANGED: 'rtc.lastn_value_changed',
  27. /**
  28. * Event emitted when ssrc for a local track is extracted and stored
  29. * in {@link TraceablePeerConnection}.
  30. * @param {JitsiLocalTrack} track which ssrc was updated
  31. * @param {string} ssrc that was stored
  32. */
  33. LOCAL_TRACK_SSRC_UPDATED: 'rtc.local_track_ssrc_updated',
  34. TRACK_ATTACHED: 'rtc.track_attached',
  35. /**
  36. * Event fired when we remote track is added to the conference.
  37. * 1st event argument is the added <tt>JitsiRemoteTrack</tt> instance.
  38. **/
  39. REMOTE_TRACK_ADDED: 'rtc.remote_track_added',
  40. // FIXME get rid of this event in favour of NO_DATA_FROM_SOURCE event
  41. // (currently implemented for local tracks only)
  42. REMOTE_TRACK_MUTE: 'rtc.remote_track_mute',
  43. /**
  44. * Indicates that the remote track has been removed from the conference.
  45. * 1st event argument is the removed {@link JitsiRemoteTrack} instance.
  46. */
  47. REMOTE_TRACK_REMOVED: 'rtc.remote_track_removed',
  48. // FIXME get rid of this event in favour of NO_DATA_FROM_SOURCE event
  49. // (currently implemented for local tracks only)
  50. REMOTE_TRACK_UNMUTE: 'rtc.remote_track_unmute',
  51. /**
  52. * Indicates error while set local description.
  53. */
  54. SET_LOCAL_DESCRIPTION_FAILED: 'rtc.set_local_description_failed',
  55. /**
  56. * Indicates error while set remote description.
  57. */
  58. SET_REMOTE_DESCRIPTION_FAILED: 'rtc.set_remote_description_failed',
  59. AUDIO_OUTPUT_DEVICE_CHANGED: 'rtc.audio_output_device_changed',
  60. DEVICE_LIST_CHANGED: 'rtc.device_list_changed',
  61. /**
  62. * Indicates that the list with available devices will change.
  63. */
  64. DEVICE_LIST_WILL_CHANGE: 'rtc.device_list_will_change',
  65. DEVICE_LIST_AVAILABLE: 'rtc.device_list_available',
  66. /**
  67. * Indicates that a message from another participant is received on
  68. * data channel.
  69. */
  70. ENDPOINT_MESSAGE_RECEIVED: 'rtc.endpoint_message_received',
  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. LOCAL_UFRAG_CHANGED: 'rtc.local_ufrag_changed',
  79. /**
  80. * Designates an event indicating that the local ICE username fragment of
  81. * the jingle session has changed.
  82. * The first argument of the vent is <tt>TraceablePeerConnection</tt> which
  83. * is the source of the event.
  84. * The second argument is the actual "ufrag" string.
  85. */
  86. REMOTE_UFRAG_CHANGED: 'rtc.remote_ufrag_changed'
  87. };
  88. module.exports = RTCEvents;