CameraFrame
ClassMetadata about the current camera image of a CameraTextureProvider.
- 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
Exposes user data
Metadata about the current camera image of a CameraTextureProvider. Modeled after the VideoFrame web API.
Index
Properties
Methods
Example
let onNewFrame = cameraTexture.control.onNewFrame;
let registration = onNewFrame.add(function (frame) {
let cameraTs = frame.timestampSeconds;
});
script.createEvent('OnDestroyEvent').bind(function () {
onNewFrame.remove(registration);
});
Extends
Properties
timestampSeconds
readonlytimestampSeconds:number
Exposes user dataSPECS
The timestamp (in seconds) in which this frame was received.
Methods
getTypeName()
staticgetTypeName():TypeName<CameraFrame>
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<CameraFrame>
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