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.ts 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. export enum RTCEvents {
  2. AUDIO_OUTPUT_DEVICE_CHANGED = 'rtc.audio_output_device_changed',
  3. /**
  4. * Designates an event indicating that some received audio SSRCs will now map to
  5. * new remote sources.
  6. */
  7. AUDIO_SSRCS_REMAPPED = 'rtc.audio_ssrcs_remapped',
  8. /**
  9. * Indicates error while create answer call.
  10. */
  11. CREATE_ANSWER_FAILED = 'rtc.create_answer_failed',
  12. /**
  13. * Indicates error while create offer call.
  14. */
  15. CREATE_OFFER_FAILED = 'rtc.create_offer_failed',
  16. DATA_CHANNEL_CLOSED = 'rtc.data_channel_closed',
  17. DATA_CHANNEL_OPEN = 'rtc.data_channel_open',
  18. DEVICE_LIST_AVAILABLE = 'rtc.device_list_available',
  19. DEVICE_LIST_CHANGED = 'rtc.device_list_changed',
  20. /**
  21. * Indicates that the list with available devices will change.
  22. */
  23. DEVICE_LIST_WILL_CHANGE = 'rtc.device_list_will_change',
  24. DOMINANT_SPEAKER_CHANGED = 'rtc.dominant_speaker_changed',
  25. ENDPOINT_CONN_STATUS_CHANGED = 'rtc.endpoint_conn_status_changed',
  26. /**
  27. * Indicates that a message from another participant is received on
  28. * data channel.
  29. */
  30. ENDPOINT_MESSAGE_RECEIVED = 'rtc.endpoint_message_received',
  31. /**
  32. * Indicates that the remote endpoint stats have been received on data channel.
  33. */
  34. ENDPOINT_STATS_RECEIVED = 'rtc.endpoint_stats_received',
  35. FORWARDED_SOURCES_CHANGED = 'rtc.forwarded_sources_changed',
  36. /**
  37. * Event emitted when {@link RTC.setLastN} method is called to update with
  38. * the new value set.
  39. * The first argument is the value passed to {@link RTC.setLastN}.
  40. */
  41. LASTN_VALUE_CHANGED = 'rtc.lastn_value_changed',
  42. /**
  43. * The max enabled resolution of a local video track was changed.
  44. */
  45. LOCAL_TRACK_MAX_ENABLED_RESOLUTION_CHANGED = 'rtc.local_track_max_enabled_resolution_changed',
  46. /**
  47. * Designates an event indicating that the local ICE username fragment of
  48. * the jingle session has changed.
  49. * The first argument of the vent is <tt>TraceablePeerConnection</tt> which
  50. * is the source of the event.
  51. * The second argument is the actual "ufrag" string.
  52. */
  53. LOCAL_UFRAG_CHANGED = 'rtc.local_ufrag_changed',
  54. /**
  55. * Event emitted when the user granted/blocked a permission for the camera / mic.
  56. * Used to keep track of the granted permissions on browsers which don't
  57. * support the Permissions API.
  58. */
  59. PERMISSIONS_CHANGED = 'rtc.permissions_changed',
  60. /**
  61. * Event fired when we remote track is added to the conference.
  62. * 1st event argument is the added <tt>JitsiRemoteTrack</tt> instance.
  63. **/
  64. REMOTE_TRACK_ADDED = 'rtc.remote_track_added',
  65. // FIXME get rid of this event in favour of NO_DATA_FROM_SOURCE event
  66. // (currently implemented for local tracks only)
  67. REMOTE_TRACK_MUTE = 'rtc.remote_track_mute',
  68. /**
  69. * Indicates that the remote track has been removed from the conference.
  70. * 1st event argument is the removed {@link JitsiRemoteTrack} instance.
  71. */
  72. REMOTE_TRACK_REMOVED = 'rtc.remote_track_removed',
  73. // FIXME get rid of this event in favour of NO_DATA_FROM_SOURCE event
  74. // (currently implemented for local tracks only)
  75. REMOTE_TRACK_UNMUTE = 'rtc.remote_track_unmute',
  76. /**
  77. * Designates an event indicating that the local ICE username fragment of
  78. * the jingle session has changed.
  79. * The first argument of the vent is <tt>TraceablePeerConnection</tt> which
  80. * is the source of the event.
  81. * The second argument is the actual "ufrag" string.
  82. */
  83. REMOTE_UFRAG_CHANGED = 'rtc.remote_ufrag_changed',
  84. SENDER_VIDEO_CONSTRAINTS_CHANGED = 'rtc.sender_video_constraints_changed',
  85. /**
  86. * Indicates error while set local description.
  87. */
  88. SET_LOCAL_DESCRIPTION_FAILED = 'rtc.set_local_description_failed',
  89. /**
  90. * Indicates error while set remote description.
  91. */
  92. SET_REMOTE_DESCRIPTION_FAILED = 'rtc.set_remote_description_failed',
  93. TRACK_ATTACHED = 'rtc.track_attached',
  94. /**
  95. * Designates an event indicating that some received video SSRCs will now map to
  96. * new remote sources.
  97. */
  98. VIDEO_SSRCS_REMAPPED = 'rtc.video_ssrcs_remapped'
  99. }
  100. export const CREATE_ANSWER_FAILED = RTCEvents.CREATE_ANSWER_FAILED;
  101. export const CREATE_OFFER_FAILED = RTCEvents.CREATE_OFFER_FAILED;
  102. export const DATA_CHANNEL_OPEN = RTCEvents.DATA_CHANNEL_OPEN;
  103. export const DATA_CHANNEL_CLOSED = RTCEvents.DATA_CHANNEL_CLOSED;
  104. export const ENDPOINT_CONN_STATUS_CHANGED = RTCEvents.ENDPOINT_CONN_STATUS_CHANGED;
  105. export const DOMINANT_SPEAKER_CHANGED = RTCEvents.DOMINANT_SPEAKER_CHANGED;
  106. export const FORWARDED_SOURCES_CHANGED = RTCEvents.FORWARDED_SOURCES_CHANGED;
  107. export const PERMISSIONS_CHANGED = RTCEvents.PERMISSIONS_CHANGED;
  108. export const SENDER_VIDEO_CONSTRAINTS_CHANGED = RTCEvents.SENDER_VIDEO_CONSTRAINTS_CHANGED;
  109. export const LASTN_VALUE_CHANGED = RTCEvents.LASTN_VALUE_CHANGED;
  110. export const LOCAL_TRACK_MAX_ENABLED_RESOLUTION_CHANGED = RTCEvents.LOCAL_TRACK_MAX_ENABLED_RESOLUTION_CHANGED;
  111. export const TRACK_ATTACHED = RTCEvents.TRACK_ATTACHED;
  112. export const REMOTE_TRACK_ADDED = RTCEvents.REMOTE_TRACK_ADDED;
  113. export const REMOTE_TRACK_MUTE = RTCEvents.REMOTE_TRACK_MUTE;
  114. export const REMOTE_TRACK_REMOVED = RTCEvents.REMOTE_TRACK_REMOVED;
  115. export const REMOTE_TRACK_UNMUTE = RTCEvents.REMOTE_TRACK_UNMUTE;
  116. export const SET_LOCAL_DESCRIPTION_FAILED = RTCEvents.SET_LOCAL_DESCRIPTION_FAILED;
  117. export const SET_REMOTE_DESCRIPTION_FAILED = RTCEvents.SET_REMOTE_DESCRIPTION_FAILED;
  118. export const AUDIO_OUTPUT_DEVICE_CHANGED = RTCEvents.AUDIO_OUTPUT_DEVICE_CHANGED;
  119. export const DEVICE_LIST_CHANGED = RTCEvents.DEVICE_LIST_CHANGED;
  120. export const DEVICE_LIST_WILL_CHANGE = RTCEvents.DEVICE_LIST_WILL_CHANGE;
  121. export const DEVICE_LIST_AVAILABLE = RTCEvents.DEVICE_LIST_AVAILABLE;
  122. export const ENDPOINT_MESSAGE_RECEIVED = RTCEvents.ENDPOINT_MESSAGE_RECEIVED;
  123. export const ENDPOINT_STATS_RECEIVED = RTCEvents.ENDPOINT_STATS_RECEIVED;
  124. export const LOCAL_UFRAG_CHANGED = RTCEvents.LOCAL_UFRAG_CHANGED;
  125. export const REMOTE_UFRAG_CHANGED = RTCEvents.REMOTE_UFRAG_CHANGED;
  126. export const VIDEO_SSRCS_REMAPPED = RTCEvents.VIDEO_SSRCS_REMAPPED;
  127. export const AUDIO_SSRCS_REMAPPED = RTCEvents.AUDIO_SSRCS_REMAPPED;
  128. // TODO: this was a pre-ES6 module using module.exports = RTCEvents which doesn't translate well
  129. // it is used in a number of places and should be updated to use the named export
  130. export default RTCEvents;