Max runtime
How long a single session can stay connected before being disconnected automatically.
When a session hits the limit, the viewer is disconnected with code
4004 (max runtime reached). Use this to prevent forgotten tabs from holding a worker indefinitely.
Inactivity timeout (AFK)
How long a viewer can go without input before being disconnected.
Inactivity is measured from the last input event (mouse, keyboard, touch, gamepad). When the timeout fires, the viewer is disconnected — freeing the worker for the next person in queue.
Auto-delete cache
A toggle in the same Session Rules tab. When on, locally cached application data is cleared at the end of every session. Use it for privacy-sensitive deployments (configurators with customer data, kiosk demos, internal tools) where you don’t want the next viewer to inherit anything.Where these rules apply
These are project-level settings stored on Streampixel. You don’t need to set them again in your iframe or SDK code — they’re enforced server-side, on every session, no matter how the viewer connected. The Web SDK has anafkWarning event so you can show your own warning before the disconnect. Its afk.timeoutSec option can make the idle time shorter than the value set here, never longer.
Next
Disconnect codes
What
4004 and other codes mean.Idle warning in the SDK
The
afkWarning and ended events, for a custom UI.