nimeet Docs
中文

State Machine

Create/run/stop/fail/restart semantics, idempotency and recovery.

Version v1.1.0 · Updated 2026-10-26 · revision 1

State machine

A session has exactly one legal path; any out-of-order call returns a negative error code instead of being ignored.

text
idle ──Start──▶ starting ──sink started──▶ recording ──Stop──▶ stopping ──verified output──▶ stopped
                    │                          │                    │
                    └──sink failed─────────────┴────────────────────┴──▶ error
StateMeaningEntered by
idleNothing startedinitial
startingOptions validated, sink startingRecordingPipeline::Start
recordingSink ready, frames acceptedsink started
stoppingFrames stopped, muxer finalisingStop
stoppedOutput verified (exists, non-empty, container, duration > 0)verification passed
errorStart/write/verify failureany failure; onError is raised

Illegal transitions

CallCurrent stateResult
Startstarting / recording / stopping-ERR_INVALID_STATE
PushVideoFramenot recording-ERR_INVALID_STATE
Stopnot recording/starting-ERR_INVALID_STATE
joinChannela session already exists-ERR_ALREADY_IN_USE
leaveChannelno session-ERR_LEAVE_CHANNEL_REJECTED

Why stopped cannot be faked

stopped is unreachable without a verified file: on failure the pipeline moves to error, records the code and reports it to the caller. The TestNoSilentSuccess test pins this with a sink that claims success without producing output.

Generated by the documentation build pipeline · 2026-10-31 01:24:02 UTC · Documentation center v1.1.0.

Content follows the public API definitions.

ni-meet is a self-hosted RTC PaaS with a LiveKit-based media plane (Apache-2.0) and an Agora-compatible API.