Skip to main content

Type Alias: PublisherState

PublisherState = "idle" | "ready" | "publishing" | "closed"

Represent the state of the Publisher instance.

  • "idle": Not encoding, not connected. Can add tracks or prepare.
  • "ready": Every track's encoder has produced output, but not connected. Can publish.
  • "publishing": Connected and publishing. Can unpublish.
  • "closed": Terminal state after close() is called or a fatal error occurs. Cannot be reused.