CameraModule.StreamInfo
ClassDescribes one stream capability of a camera (read-only).
- Snapchat: not supported
- SPECS: fully supported
- Camera Kit Web: not supported
- Camera Kit Mobile: not supported
- 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
Since Lens Scripting v368Exposes user data
Describes one stream capability of a camera (read-only).
Index
Properties
Methods
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
readonlycamera:CameraInfo
Exposes user dataSPECS
The camera this capability belongs to.
Since
Lens Scripting Version 387
description
readonlydescription: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
readonlyheight:number
Exposes user dataSPECS
Image height in pixels.
Since
Lens Scripting Version 368
imageFormat
readonlyimageFormat:ImageFormat
Exposes user dataSPECS
Image format for this stream configuration.
Since
Lens Scripting Version 368
maxFrameRate
readonlymaxFrameRate: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
readonlyoperation: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
readonlyquality:Quality
Exposes user dataSPECS
Processing quality tier of this stream configuration.
Since
Lens Scripting Version 387
width
readonlywidth:number
Exposes user dataSPECS
Image width in pixels.
Since
Lens Scripting Version 368
Methods
getTypeName()
staticgetTypeName():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
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
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
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean