Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

RTCEvents.js 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. SENDER_VIDEO_CONSTRAINTS_CHANGED: 'rtc.sender_video_constraints_changed',
  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. /**
  35. * The max enabled resolution of a local video track was changed.
  36. */
  37. LOCAL_TRACK_MAX_ENABLED_RESOLUTION_CHANGED: 'rtc.local_track_max_enabled_resolution_changed',
  38. TRACK_ATTACHED: 'rtc.track_attached',
  39. /**
  40. * Event fired when we remote track is added to the conference.
  41. * 1st event argument is the added <tt>JitsiRemoteTrack</tt> instance.
  42. **/
  43. REMOTE_TRACK_ADDED: 'rtc.remote_track_added',
  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_MUTE: 'rtc.remote_track_mute',
  47. /**
  48. * Indicates that the remote track has been removed from the conference.
  49. * 1st event argument is the removed {@link JitsiRemoteTrack} instance.
  50. */
  51. REMOTE_TRACK_REMOVED: 'rtc.remote_track_removed',
  52. // FIXME get rid of this event in favour of NO_DATA_FROM_SOURCE event
  53. // (currently implemented for local tracks only)
  54. REMOTE_TRACK_UNMUTE: 'rtc.remote_track_unmute',
  55. /**
  56. * Indicates error while set local description.
  57. */
  58. SET_LOCAL_DESCRIPTION_FAILED: 'rtc.set_local_description_failed',
  59. /**
  60. * Indicates error while set remote description.
  61. */
  62. SET_REMOTE_DESCRIPTION_FAILED: 'rtc.set_remote_description_failed',
  63. AUDIO_OUTPUT_DEVICE_CHANGED: 'rtc.audio_output_device_changed',
  64. DEVICE_LIST_CHANGED: 'rtc.device_list_changed',
  65. /**
  66. * Indicates that the list with available devices will change.
  67. */
  68. DEVICE_LIST_WILL_CHANGE: 'rtc.device_list_will_change',
  69. DEVICE_LIST_AVAILABLE: 'rtc.device_list_available',
  70. /**
  71. * Indicates that a message from another participant is received on
  72. * data channel.
  73. */
  74. ENDPOINT_MESSAGE_RECEIVED: 'rtc.endpoint_message_received',
  75. /**
  76. * Designates an event indicating that the local ICE username fragment of
  77. * the jingle session has changed.
  78. * The first argument of the vent is <tt>TraceablePeerConnection</tt> which
  79. * is the source of the event.
  80. * The second argument is the actual "ufrag" string.
  81. */
  82. LOCAL_UFRAG_CHANGED: 'rtc.local_ufrag_changed',
  83. /**
  84. * Designates an event indicating that the local ICE username fragment of
  85. * the jingle session has changed.
  86. * The first argument of the vent is <tt>TraceablePeerConnection</tt> which
  87. * is the source of the event.
  88. * The second argument is the actual "ufrag" string.
  89. */
  90. REMOTE_UFRAG_CHANGED: 'rtc.remote_ufrag_changed'
  91. };
  92. module.exports = RTCEvents;