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

JitsiConnectionEvents.ts 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. * Indicates that the performed action cannot be executed because the
  50. * connection is not in the correct state(connected, disconnected, etc.)
  51. */
  52. WRONG_STATE = 'connection.wrongState'
  53. }
  54. // exported for backward compatibility
  55. export const CONNECTION_DISCONNECTED = JitsiConnectionEvents.CONNECTION_DISCONNECTED;
  56. export const CONNECTION_ESTABLISHED = JitsiConnectionEvents.CONNECTION_ESTABLISHED;
  57. export const CONNECTION_FAILED = JitsiConnectionEvents.CONNECTION_FAILED;
  58. export const CONNECTION_REDIRECTED = JitsiConnectionEvents.CONNECTION_REDIRECTED;
  59. export const WRONG_STATE = JitsiConnectionEvents.WRONG_STATE;
  60. export const DISPLAY_NAME_REQUIRED = JitsiConnectionEvents.DISPLAY_NAME_REQUIRED;
  61. export const PROPERTIES_UPDATED = JitsiConnectionEvents.PROPERTIES_UPDATED;