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 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. /**
  13. * FIXME: rename to something closer to "local streams SDP changed"
  14. * Indicates that the local sendrecv streams in local SDP are changed.
  15. */
  16. SENDRECV_STREAMS_CHANGED: 'rtc.sendrecv_streams_changed',
  17. DATA_CHANNEL_OPEN: 'rtc.data_channel_open',
  18. ENDPOINT_CONN_STATUS_CHANGED: 'rtc.endpoint_conn_status_changed',
  19. LASTN_CHANGED: 'rtc.lastn_changed',
  20. DOMINANT_SPEAKER_CHANGED: 'rtc.dominant_speaker_changed',
  21. LASTN_ENDPOINT_CHANGED: 'rtc.lastn_endpoint_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. * The following structure is passed as an argument:
  27. * {
  28. * stream: the WebRTC MediaStream instance
  29. * track: the WebRTC MediaStreamTrack
  30. * mediaType: the MediaType instance
  31. * owner: the MUC JID of the stream owner
  32. * muted: a boolean indicating initial 'muted' status of the track or
  33. * 'null' if unknown
  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 ID of the parent WebRTC stream to which
  42. * the track being removed belongs to.
  43. * 2nd event argument is the ID of the removed track.
  44. */
  45. REMOTE_TRACK_REMOVED: 'rtc.remote_track_removed',
  46. // FIXME get rid of this event in favour of NO_DATA_FROM_SOURCE event
  47. // (currently implemented for local tracks only)
  48. REMOTE_TRACK_UNMUTE: 'rtc.remote_track_unmute',
  49. /**
  50. * Indicates error while set local description.
  51. */
  52. SET_LOCAL_DESCRIPTION_FAILED: 'rtc.set_local_description_failed',
  53. /**
  54. * Indicates error while set remote description.
  55. */
  56. SET_REMOTE_DESCRIPTION_FAILED: 'rtc.set_remote_description_failed',
  57. AUDIO_OUTPUT_DEVICE_CHANGED: 'rtc.audio_output_device_changed',
  58. DEVICE_LIST_CHANGED: 'rtc.device_list_changed',
  59. DEVICE_LIST_AVAILABLE: 'rtc.device_list_available',
  60. /**
  61. * Indicates that a message from another participant is received on
  62. * data channel.
  63. */
  64. ENDPOINT_MESSAGE_RECEIVED:
  65. 'rtc.endpoint_message_received'
  66. };
  67. module.exports = RTCEvents;