[CameraKit Web SDK - v0.22.0](../README.md) / [Exports](../modules.md) / LensSource

# Interface: LensSource

Provides Lens metadata for one or more Lens groups.

When a Lens or Lens group is requested via the [LensRepository](../classes/LensRepository.md), CameraKit will find the LensSource which
claims ownership of that group. The appropriate LensSource method will be called and must return an ArrayBuffer
containing the encoded Lens metadata -- this can be obtained from a CameraKit backend API.

## Table of contents

### Methods

- [isGroupOwner](LensSource.md#isgroupowner)
- [loadLens](LensSource.md#loadlens)
- [loadLensGroup](LensSource.md#loadlensgroup)

## Methods

### isGroupOwner

▸ **isGroupOwner**(`groupId`): `boolean`

#### Parameters

| Name | Type |
| :------ | :------ |
| `groupId` | `string` |

#### Returns

`boolean`

___

### loadLens

▸ **loadLens**(`lensId`, `groupId`): `Promise`\<`ArrayBuffer`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `lensId` | `string` |
| `groupId` | `string` |

#### Returns

`Promise`\<`ArrayBuffer`\>

___

### loadLensGroup

▸ **loadLensGroup**(`groupId`): `Promise`\<`ArrayBuffer`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `groupId` | `string` |

#### Returns

`Promise`\<`ArrayBuffer`\>
