modified lib-jitsi-meet dev repo
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.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. * Indicates that the performed action cannot be executed because the
  35. * connection is not in the correct state(connected, disconnected, etc.)
  36. */
  37. WRONG_STATE = 'connection.wrongState',
  38. /**
  39. * Indicates that the display name is required over this connection and need to be supplied when
  40. * joining the room.
  41. * There are cases like lobby room where display name is required.
  42. */
  43. DISPLAY_NAME_REQUIRED = 'connection.display_name_required'
  44. };
  45. // exported for backward compatibility
  46. export const CONNECTION_DISCONNECTED = JitsiConnectionEvents.CONNECTION_DISCONNECTED;
  47. export const CONNECTION_ESTABLISHED = JitsiConnectionEvents.CONNECTION_ESTABLISHED;
  48. export const CONNECTION_FAILED = JitsiConnectionEvents.CONNECTION_FAILED;
  49. export const WRONG_STATE = JitsiConnectionEvents.WRONG_STATE;
  50. export const DISPLAY_NAME_REQUIRED = JitsiConnectionEvents.DISPLAY_NAME_REQUIRED;