Skip to main content

CameraModule.StreamInfo

Class

Describes one stream capability of a camera (read-only).

  • 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

Describes one stream capability of a camera (read-only).

Index

Remarks

One advertised resolution, image format and quality tier of a camera, with its maximum frame rate and the session it works with (CameraModule.StreamInfo#operation). Returned by CameraModule.CameraInfo#getStreams. Pass to CameraModule.StreamConfig#stream to configure a session.

Extends

Properties

camera

readonly camera: CameraInfo

Exposes user dataSPECS

The camera this capability belongs to.

Since

Lens Scripting Version 387


description

readonly description: string

Exposes user dataSPECS

Human-readable label from the camera service, for example rgb 1008x756,streaming. Informational only: the format may change, so use CameraModule.StreamInfo#operation and the other properties to select a capability.

Since

Lens Scripting Version 368


height

readonly height: number

Exposes user dataSPECS

Image height in pixels.

Since

Lens Scripting Version 368


imageFormat

readonly imageFormat: ImageFormat

Exposes user dataSPECS

Image format for this stream configuration.

Since

Lens Scripting Version 368


maxFrameRate

readonly maxFrameRate: number

Exposes user dataSPECS

Advertised maximum frame rate in Hz (30 for the RGB and mono cameras on current hardware). Set the minimum you need with CameraModule.StreamConfig#minFrameRate. Frame delivery can be slower when the lens cannot keep up with the camera.

Since

Lens Scripting Version 387


operation

readonly operation: Operation

Exposes user dataSPECS

Which session this capability works with: CameraModule.StreamingSession for Streaming, CameraModule.CaptureSession for Capture.

Remarks

Select by operation, not by format or resolution: the same resolution and format can be offered once for each operation.

Since

Lens Scripting Version 387


quality

readonly quality: Quality

Exposes user dataSPECS

Processing quality tier of this stream configuration.

Since

Lens Scripting Version 387


width

readonly width: number

Exposes user dataSPECS

Image width in pixels.

Since

Lens Scripting Version 368

Methods

getTypeName()

static getTypeName(): TypeName<StreamInfo>

Exposes user dataSPECS

Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().

Returns

TypeName<StreamInfo>

Since

Lens Scripting Version 368

Overrides

ScriptObject.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

ScriptObject.getTypeName


isOfType()

isOfType(type): boolean

Returns true if the object matches or derives from the passed in type.

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

ScriptObject.isOfType


isSame()

isSame(other): boolean

Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

Parameters

ParameterType
otherScriptObject

Returns

boolean

Inherited from

ScriptObject.isSame