Skip to main content

CameraModule.StreamStatus

Enum

Session lifecycle status delivered via onStatusChanged event.

  • Snapchat: not supported
  • SPECS: fully supported
  • Camera Kit Web: not supported
  • Camera Kit Mobile: not supported
1 platform note
  • SnapchatNot supported — Available on SPECS only
  • SPECSFully supported
    • Restricted when the Lens uses internet-connected APIs (see Privacy Restrictions).
  • Camera Kit WebNot supported — Available on SPECS only
  • Camera Kit MobileNot supported — Available on SPECS only

Platform details

  • Snapchat — Not supported — Available on SPECS only.

  • SPECS — Fully supported. Restricted when the Lens uses internet-connected APIs (see Privacy Restrictions)

  • Camera Kit Web — Not supported — Available on SPECS only.

  • Camera Kit Mobile — Not supported — Available on SPECS only.

Since Lens Scripting v368Exposes user data

Session lifecycle status delivered via onStatusChanged event.

Index

Remarks

  • Interrupted: frames pause, for example while the camera switches modes because another session started, or while the camera recovers from an error. The session stays started. A capture in flight can be lost: its Promise rejects about 30 seconds after capture() was called. Capture again after Resumed.
  • Resumed: frames flow again after an interruption.
  • Disconnected: the system ended the session: camera access was revoked, the camera service stopped the stream, or a capture session went 60 s without a capture. The session is finished; create a new one.

Enumeration Members

Disconnected

Disconnected: number

Exposes user dataSPECS

The system ended the session: camera access was revoked, the camera service stopped the stream (for example, another stream switched the camera to a mode without this stream's size), the camera service restarted, or a capture session went 60 s without a capture. Create a new session.

Since

Lens Scripting Version 368


Interrupted

Interrupted: number

Exposes user dataSPECS

Frames pause; the session stays started.

Since

Lens Scripting Version 368


Resumed

Resumed: number

Exposes user dataSPECS

Frames flow again after an interruption.

Since

Lens Scripting Version 368