stop()
stop() stops only the currently running local detector runtime.
The SDK access token, token refresh state, and account/policy state are retained. Therefore, if the same user needs to run detection again, you can call start() without calling login() again.
Role
When stop() is called, the SDK internally cleans up the following local runtime state.
Stop detection loop
-> Stop webcam stream
-> Clean up overlay state
-> Clean up local detection-event state
Usage Example
detector.stop();
If you need to end the SDK session as well, such as during user logout, call logout() after stop().
detector.stop();
await detector.logout();
If stop() is called again while already stopped, it is handled as a no-op.
Difference from logout()
stop() is a local runtime API that stops the camera and detection loop.
logout() is the SDK session termination API. If the detector is running, logout() throws a DETECTOR_RUNNING error, so call stop() first.
Notes
stop()does not send a MonitorDog logout activity event.stop()does not remove the SDK access token.stop()is appropriate for flows such as temporarily leaving a screen, switching tabs, or pausing detection.- For user logout or session termination flows, call
logout()afterstop().