您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

RTCEvents.js 3.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. * FIXME not used (yet), but hook up with create offer failure once added
  9. */
  10. CREATE_OFFER_FAILED: 'rtc.create_offer_failed',
  11. RTC_READY: 'rtc.ready',
  12. DATA_CHANNEL_OPEN: 'rtc.data_channel_open',
  13. ENDPOINT_CONN_STATUS_CHANGED: 'rtc.endpoint_conn_status_changed',
  14. DOMINANT_SPEAKER_CHANGED: 'rtc.dominant_speaker_changed',
  15. LASTN_ENDPOINT_CHANGED: 'rtc.lastn_endpoint_changed',
  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. AVAILABLE_DEVICES_CHANGED: 'rtc.available_devices_changed',
  23. TRACK_ATTACHED: 'rtc.track_attached',
  24. /**
  25. * Event fired when we remote track is added to the conference.
  26. * 1st event argument is the added <tt>JitsiRemoteTrack</tt> instance.
  27. **/
  28. REMOTE_TRACK_ADDED: 'rtc.remote_track_added',
  29. // FIXME get rid of this event in favour of NO_DATA_FROM_SOURCE event
  30. // (currently implemented for local tracks only)
  31. REMOTE_TRACK_MUTE: 'rtc.remote_track_mute',
  32. /**
  33. * Indicates that the remote track has been removed from the conference.
  34. * 1st event argument is the removed {@link JitsiRemoteTrack} instance.
  35. */
  36. REMOTE_TRACK_REMOVED: 'rtc.remote_track_removed',
  37. // FIXME get rid of this event in favour of NO_DATA_FROM_SOURCE event
  38. // (currently implemented for local tracks only)
  39. REMOTE_TRACK_UNMUTE: 'rtc.remote_track_unmute',
  40. /**
  41. * Indicates error while set local description.
  42. */
  43. SET_LOCAL_DESCRIPTION_FAILED: 'rtc.set_local_description_failed',
  44. /**
  45. * Indicates error while set remote description.
  46. */
  47. SET_REMOTE_DESCRIPTION_FAILED: 'rtc.set_remote_description_failed',
  48. AUDIO_OUTPUT_DEVICE_CHANGED: 'rtc.audio_output_device_changed',
  49. DEVICE_LIST_CHANGED: 'rtc.device_list_changed',
  50. DEVICE_LIST_AVAILABLE: 'rtc.device_list_available',
  51. /**
  52. * Indicates that a message from another participant is received on
  53. * data channel.
  54. */
  55. ENDPOINT_MESSAGE_RECEIVED: 'rtc.endpoint_message_received',
  56. /**
  57. * Designates an event indicating that the local ICE username fragment of
  58. * the jingle session has changed.
  59. * The first argument of the vent is <tt>TraceablePeerConnection</tt> which
  60. * is the source of the event.
  61. * The second argument is the actual "ufrag" string.
  62. */
  63. LOCAL_UFRAG_CHANGED: 'rtc.local_ufrag_changed',
  64. /**
  65. * Designates an event indicating that the local ICE username fragment of
  66. * the jingle session has changed.
  67. * The first argument of the vent is <tt>TraceablePeerConnection</tt> which
  68. * is the source of the event.
  69. * The second argument is the actual "ufrag" string.
  70. */
  71. REMOTE_UFRAG_CHANGED: 'rtc.remote_ufrag_changed'
  72. };
  73. module.exports = RTCEvents;