LensesComponent

Provides access to all available features of lenses. Normally, an instance of a component is acquired through com.snap.camerakit.Session which manages the lifecycle of the component.

Types

Link copied to clipboard
interface Audio

Provides control over the lenses audio.

Link copied to clipboard
interface Builder
Link copied to clipboard
interface Cache

Provides ability to interact with lenses content cache used by LensesComponent.

Link copied to clipboard
interface Carousel

Provides ability to interact with lenses carousel feature which can be enabled with Configuration supplied to LensesComponent.Builder.configureCarousel method.

Link copied to clipboard
interface Hints

Provides ability to interact with lens hints feature which can be enabled with Configuration supplied to LensesComponent.Builder.configureHints method.

Link copied to clipboard
interface Lens

Defines the data model of a lens that is available to be used by LensesComponent exposed features.

Link copied to clipboard
interface LoadingOverlay

Provides ability to interact with lens loading overlay feature which can be enabled with Configuration supplied to LensesComponent.Builder.configureLoadingOverlay method. If enabled, loading overlay is shown when a lens that is being applied via Processor.apply or selected via Carousel is loading resources from network or other sources.

Link copied to clipboard
interface MediaPicker

Provides ability to interact with lens media picker feature which can be enabled with Configuration supplied to LensesComponent.Builder.configureMediaPicker method. If enabled, media picker is shown when an applied lens requires media data and displays media items which MediaProcessor receives from MediaProcessor.Input.

Link copied to clipboard

Implementation of LensesComponent which does nothing.

Link copied to clipboard
interface Preferences

Provides ability to interact with storage used by lenses to store user specific data such as game or on-boarding state, options etc.

Link copied to clipboard
interface Prefetcher

Provides ability to prefetch content of lenses before they are applied using a Processor. The amount of lenses content that gets prefetched is limited by the Cache.Configuration provided to LensesComponent.

Link copied to clipboard

Extension of ImageProcessor that allows to apply and remove lenses on top of the incoming image and audio input stream rendered to connected outputs.

Link copied to clipboard

Provides ability to handle remote API requests that originate within lenses. Lifecycle of a RemoteApiService is scoped to a lifecycle of a single lens. To provide RemoteApiService instances, register a RemoteApiService.Factory via the Builder.remoteApiServiceFactory method.

Link copied to clipboard
interface Repository

Provides ability to query lenses that are available to interact with by specific criteria.

Functions

Link copied to clipboard
abstract override fun close()

Closes all resources allocated for this LensesComponent. Overridden to indicate that calling close will not throw.

Properties

Link copied to clipboard

Provides control over the lenses audio. If this LensesComponent is closed then the returned Audio is expected to be no-op.

Link copied to clipboard

Provides a Carousel of lenses available to interact with during this component lifecycle. If this LensesComponent is closed or if this LensesComponent was not configured to enable carousel using LensesComponent.Builder.configureCarousel then the returned Carousel is expected to be no-op.

Link copied to clipboard

Provides a Preferences of lenses available to interact with during this component lifecycle. If this LensesComponent is closed then the returned Preferences is expected to be no-op.

Link copied to clipboard

Provides a Prefetcher of lenses available to interact with during this component lifecycle. If this LensesComponent is closed then the returned Prefetcher is expected to be no-op.

Link copied to clipboard

Provides lenses specific Processor which allows to process image and audio input with applied lenses while rendering results to connected outputs. If this LensesComponent is closed then the returned Processor is expected to be no-op.

Link copied to clipboard

Provides a Repository of lenses available to interact with during this component lifecycle. If this LensesComponent is closed then the returned Repository is expected to be no-op.

Inheritors

Link copied to clipboard