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.

JitsiConnectionEvents.ts 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /**
  2. * The events for the connection.
  3. */
  4. export enum JitsiConnectionEvents {
  5. /**
  6. * Indicates that the connection has been disconnected. The event provides
  7. * the following parameters to its listeners:
  8. *
  9. * @param msg {string} a message associated with the disconnect such as the
  10. * last (known) error message
  11. */
  12. CONNECTION_DISCONNECTED = 'connection.connectionDisconnected',
  13. /**
  14. * Indicates that the connection has been established. The event provides
  15. * the following parameters to its listeners:
  16. *
  17. * @param id {string} the ID of the local endpoint/participant/peer (within
  18. * the context of the established connection)
  19. */
  20. CONNECTION_ESTABLISHED = 'connection.connectionEstablished',
  21. /**
  22. * Indicates that the connection has been failed for some reason. The event
  23. * provides the following parameters to its listeners:
  24. *
  25. * @param errType {JitsiConnectionErrors} the type of error associated with
  26. * the failure
  27. * @param errReason {string} the error (message) associated with the failure
  28. * @param credentials {object} the credentials used to connect (if any)
  29. * @param errReasonDetails {object} an optional object with details about
  30. * the error, like shard moving, suspending. Used for analytics purposes.
  31. */
  32. CONNECTION_FAILED = 'connection.connectionFailed',
  33. /**
  34. * The connection is redirected to a visitor node.
  35. */
  36. CONNECTION_REDIRECTED = 'connection.redirected',
  37. /**
  38. * Indicates that the display name is required over this connection and need to be supplied when
  39. * joining the room.
  40. * There are cases like lobby room where display name is required.
  41. */
  42. DISPLAY_NAME_REQUIRED = 'connection.display_name_required',
  43. /**
  44. * Indicates that the connection properties have been updated.
  45. * @param properties {object} - All available connection properties (e.g. shard, region).
  46. */
  47. PROPERTIES_UPDATED = 'connection.propertiesUpdated',
  48. }
  49. // exported for backward compatibility
  50. export const CONNECTION_DISCONNECTED = JitsiConnectionEvents.CONNECTION_DISCONNECTED;
  51. export const CONNECTION_ESTABLISHED = JitsiConnectionEvents.CONNECTION_ESTABLISHED;
  52. export const CONNECTION_FAILED = JitsiConnectionEvents.CONNECTION_FAILED;
  53. export const CONNECTION_REDIRECTED = JitsiConnectionEvents.CONNECTION_REDIRECTED;
  54. export const DISPLAY_NAME_REQUIRED = JitsiConnectionEvents.DISPLAY_NAME_REQUIRED;
  55. export const PROPERTIES_UPDATED = JitsiConnectionEvents.PROPERTIES_UPDATED;