The entry point to the CameraKit SDK's API. Most of CameraKit's features are accessed via this class.

Applications obtain an instance of CameraKit by calling bootstrapCameraKit.

const cameraKit = await bootstrapCameraKit(config)

Then this class can be used to:

  • Create a CameraKitSession instance, which provides the API for setting up media inputs, applying Lenses, and obtaining rendered <canvas> outputs.
  • Query for lenses using LensRepository.
  • Listen for lens usage metrics events using MetricsEventTarget.

Properties

lenses: { repository: LensRepository }

Use lensRepository

Business metrics (e.g. each time a lens is viewed) are emitted here.

lensRepository: LensRepository

Used to query for lenses and lens groups.

Methods

  • Destroys all sessions and frees all resources.

    Returns Promise<void>

MMNEPVFCICPMFPCPTTAAATR