Session Lifecycle
A session is identified by its unique id and traverses different states.
A new session is created via a post on /api/v2/session
. The session is
then tied to the client-id and the api-id which both are encoded within the
jws-token.
- INIT : SessionID has been created/reserverd.
- SETUP: Client is connected via ws and setup starts.
- ACTIVE: Session has started.
- SHUTDOWN: Session is shutting down.
- TERMINATED: Session has been terminated.
Note: Only one session per client-id-api-id should be allowed in states SETUP and ACTIVE.
The ACTIVE state can be ended by the following events:
- Client sends a ws message type
session_stop
. - The ws-socket is closed (on purpose or via lost ping/pong, etc.)
- The ice-connection goes into state failed/closed/disconnected
- max-recording-time has been reached