ambient:update event includes an ambientId field, which is the unique identifier for the session. Use this ID to track the session lifecycle. For details, see emitter events types.
Lifecycle events
The Web SDK emits these events when the session state changes:ambient:start- Emitted when a new ambient session is started.ambient:pause- Emitted when the ambient session is paused.ambient:resume- Emitted when the ambient session is resumed.ambient:cancel- Emitted when the ambient session is cancelled.ambient:submit- Emitted when the ambient session is submitted.
- JavaScript
- React
JavaScript
Status flags
Returns
true if an ambient session is currently active (started and not cancelled or submitted).Returns
true if the ambient session is currently in a paused state.Next steps
- Implement controlled sessions: Ambient implementation
- Configure problem-based notes: PBC
- Return to Ambient session overview