@snap/camera-kit 1.0.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/CameraKit.d.ts +17 -6
- package/dist/CameraKit.d.ts.map +1 -1
- package/dist/CameraKit.js +26 -4
- package/dist/CameraKit.js.map +1 -1
- package/dist/RootServices.d.ts +6 -2
- package/dist/RootServices.d.ts.map +1 -1
- package/dist/RootServices.js.map +1 -1
- package/dist/bootstrapCameraKit.d.ts.map +1 -1
- package/dist/bootstrapCameraKit.js +6 -2
- package/dist/bootstrapCameraKit.js.map +1 -1
- package/dist/clients/remoteApiSpecsClient.d.ts +10 -0
- package/dist/clients/remoteApiSpecsClient.d.ts.map +1 -0
- package/dist/clients/remoteApiSpecsClient.js +6 -0
- package/dist/clients/remoteApiSpecsClient.js.map +1 -0
- package/dist/common/typeguards.d.ts +3 -0
- package/dist/common/typeguards.d.ts.map +1 -1
- package/dist/common/typeguards.js +12 -0
- package/dist/common/typeguards.js.map +1 -1
- package/dist/configuration.d.ts +115 -0
- package/dist/configuration.d.ts.map +1 -1
- package/dist/configuration.js +1 -0
- package/dist/configuration.js.map +1 -1
- package/dist/environment.js +1 -1
- package/dist/environment.js.map +1 -1
- package/dist/extensions/extensionRequestContext.d.ts +6 -0
- package/dist/extensions/extensionRequestContext.d.ts.map +1 -1
- package/dist/extensions/extensionRequestContext.js +3 -2
- package/dist/extensions/extensionRequestContext.js.map +1 -1
- package/dist/geo/geoDataProvider.d.ts +32 -0
- package/dist/geo/geoDataProvider.d.ts.map +1 -0
- package/dist/geo/geoDataProvider.js +25 -0
- package/dist/geo/geoDataProvider.js.map +1 -0
- package/dist/geo/registerGeoDataProvider.d.ts +11 -0
- package/dist/geo/registerGeoDataProvider.d.ts.map +1 -0
- package/dist/geo/registerGeoDataProvider.js +22 -0
- package/dist/geo/registerGeoDataProvider.js.map +1 -0
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/lens-core-module/generated-types.d.ts +28 -0
- package/dist/lens-core-module/generated-types.d.ts.map +1 -1
- package/dist/lens-core-module/generated-types.js.map +1 -1
- package/dist/lens-core-module/lensCore.d.ts.map +1 -1
- package/dist/lens-core-module/lensCore.js +1 -0
- package/dist/lens-core-module/lensCore.js.map +1 -1
- package/dist/lensCoreWasmVersions.js +3 -3
- package/dist/lensCoreWasmVersions.js.map +1 -1
- package/dist/platform/platformInfo.d.ts.map +1 -1
- package/dist/platform/platformInfo.js +1 -1
- package/dist/platform/platformInfo.js.map +1 -1
- package/dist/remote-configuration/cofHandler.js.map +1 -1
- package/dist/remote-configuration/remoteConfiguration.d.ts +4 -0
- package/dist/remote-configuration/remoteConfiguration.d.ts.map +1 -1
- package/dist/remote-configuration/remoteConfiguration.js +10 -0
- package/dist/remote-configuration/remoteConfiguration.js.map +1 -1
- package/dist/session/CameraKitSession.d.ts +9 -9
- package/dist/session/CameraKitSession.d.ts.map +1 -1
- package/dist/session/CameraKitSession.js +4 -2
- package/dist/session/CameraKitSession.js.map +1 -1
- package/dist/session/LensKeyboard.d.ts +75 -31
- package/dist/session/LensKeyboard.d.ts.map +1 -1
- package/dist/session/LensKeyboard.js +60 -38
- package/dist/session/LensKeyboard.js.map +1 -1
- package/dist/uri-handlers/UriHandlers.d.ts.map +1 -0
- package/dist/uri-handlers/UriHandlers.js.map +1 -0
- package/dist/uri-handlers/internal-handlers/httpUriHandler.d.ts +42 -0
- package/dist/uri-handlers/internal-handlers/httpUriHandler.d.ts.map +1 -0
- package/dist/uri-handlers/internal-handlers/httpUriHandler.js +149 -0
- package/dist/uri-handlers/internal-handlers/httpUriHandler.js.map +1 -0
- package/dist/uri-handlers/internal-handlers/httpValidators.d.ts +9 -0
- package/dist/uri-handlers/internal-handlers/httpValidators.d.ts.map +1 -0
- package/dist/uri-handlers/internal-handlers/httpValidators.js +115 -0
- package/dist/uri-handlers/internal-handlers/httpValidators.js.map +1 -0
- package/dist/{extensions/RemoteApiServices.d.ts → uri-handlers/internal-handlers/remoteApiUriHandler.d.ts} +8 -8
- package/dist/uri-handlers/internal-handlers/remoteApiUriHandler.d.ts.map +1 -0
- package/dist/uri-handlers/internal-handlers/remoteApiUriHandler.js +121 -0
- package/dist/uri-handlers/internal-handlers/remoteApiUriHandler.js.map +1 -0
- package/dist/{extensions → uri-handlers}/uriHandlersRegister.d.ts +6 -4
- package/dist/uri-handlers/uriHandlersRegister.d.ts.map +1 -0
- package/dist/{extensions → uri-handlers}/uriHandlersRegister.js +13 -3
- package/dist/uri-handlers/uriHandlersRegister.js.map +1 -0
- package/dist/uri-handlers/uriRequestProcessor.d.ts +37 -0
- package/dist/uri-handlers/uriRequestProcessor.d.ts.map +1 -0
- package/dist/uri-handlers/uriRequestProcessor.js +69 -0
- package/dist/uri-handlers/uriRequestProcessor.js.map +1 -0
- package/docs/html/assets/hierarchy.js +1 -0
- package/docs/html/assets/highlight.css +9 -2
- package/docs/html/assets/icons.js +18 -0
- package/docs/html/assets/icons.svg +1 -0
- package/docs/html/assets/main.js +5 -4
- package/docs/html/assets/navigation.js +1 -1
- package/docs/html/assets/search.js +1 -1
- package/docs/html/assets/style.css +1422 -1226
- package/docs/html/classes/CameraKit.html +18 -16
- package/docs/html/classes/CameraKitSession.html +79 -51
- package/docs/html/classes/CameraKitSource.html +18 -18
- package/docs/html/classes/LensPerformanceMeasurement.html +11 -11
- package/docs/html/classes/LensPerformanceMetrics.html +8 -7
- package/docs/html/classes/LensRepository.html +25 -23
- package/docs/html/classes/Transform2D.html +9 -9
- package/docs/html/classes/TypedCustomEvent.html +5 -4
- package/docs/html/classes/TypedEventTarget.html +6 -6
- package/docs/html/enums/Lens_CameraFacing.html +5 -5
- package/docs/html/functions/bootstrapCameraKit.html +11 -10
- package/docs/html/functions/createExtension.html +7 -6
- package/docs/html/functions/createImageSource.html +5 -5
- package/docs/html/functions/createMediaStreamSource.html +5 -5
- package/docs/html/functions/createVideoSource.html +5 -5
- package/docs/html/functions/estimateLensPerformance.html +2 -2
- package/docs/html/functions/filePickerFactory.html +2 -2
- package/docs/html/functions/getExtensionRequestContext.html +3 -0
- package/docs/html/functions/lensSourcesFactory.html +5 -4
- package/docs/html/functions/remoteApiServicesFactory.html +1 -1
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/index.html +111 -88
- package/docs/html/interfaces/BitmojiUserInfo.html +3 -3
- package/docs/html/interfaces/CameraKitBootstrapConfiguration.html +40 -21
- package/docs/html/interfaces/CameraKitDeviceOptions.html +7 -7
- package/docs/html/interfaces/CameraKitSourceInfo.html +7 -7
- package/docs/html/interfaces/CameraKitSourceSubscriber.html +4 -4
- package/docs/html/interfaces/ComputedFrameMetrics.html +6 -6
- package/docs/html/interfaces/CreateSessionOptions.html +7 -7
- package/docs/html/interfaces/EstimatedLensPerformance.html +5 -5
- package/docs/html/interfaces/Font.html +6 -0
- package/docs/html/interfaces/FriendUserInfo.html +4 -4
- package/docs/html/interfaces/FunctionSourceOptions.html +4 -4
- package/docs/html/interfaces/Keyboard.html +29 -0
- package/docs/html/interfaces/KeyboardActiveEvent.html +12 -0
- package/docs/html/interfaces/Lens.html +21 -21
- package/docs/html/interfaces/LensCreator.html +3 -3
- package/docs/html/interfaces/LensHttpRequest.html +16 -0
- package/docs/html/interfaces/LensLaunchData.html +6 -6
- package/docs/html/interfaces/LensSource.html +5 -5
- package/docs/html/interfaces/LensUserData.html +10 -10
- package/docs/html/interfaces/LoadAssetRequest.html +10 -10
- package/docs/html/interfaces/MediaStreamSourceOptions.html +11 -11
- package/docs/html/interfaces/Preview.html +4 -4
- package/docs/html/interfaces/RemoteApiRequest.html +10 -10
- package/docs/html/interfaces/RemoteApiResponse.html +8 -8
- package/docs/html/interfaces/RemoteApiService.html +9 -9
- package/docs/html/interfaces/Snapcode.html +6 -6
- package/docs/html/interfaces/UriCancelRequest.html +3 -3
- package/docs/html/interfaces/UriRequest.html +7 -7
- package/docs/html/interfaces/UriResponse.html +6 -6
- package/docs/html/interfaces/VideoSourceOptions.html +9 -9
- package/docs/html/modules.html +1 -99
- package/docs/html/types/ArgumentValidationError.html +2 -2
- package/docs/html/types/AssetLoader.html +4 -4
- package/docs/html/types/AssetResponse.html +1 -1
- package/docs/html/types/AssetTiming.html +2 -2
- package/docs/html/types/BenchmarkError.html +1 -1
- package/docs/html/types/BootstrapError.html +2 -2
- package/docs/html/types/CacheKeyNotFoundError.html +1 -1
- package/docs/html/types/CameraKitSessionEventListener.html +2 -2
- package/docs/html/types/CameraKitSessionEvents.html +4 -3
- package/docs/html/types/CameraKitSourceError.html +1 -1
- package/docs/html/types/ConfigurationError.html +2 -2
- package/docs/html/types/FetchHandler.html +1 -1
- package/docs/html/types/FilePicker.html +5 -5
- package/docs/html/types/FilePickerOptions.html +2 -2
- package/docs/html/types/FilePickerResult.html +2 -2
- package/docs/html/types/KeyboardEventListener.html +2 -0
- package/docs/html/types/KeyboardEvents.html +2 -2
- package/docs/html/types/LegalError.html +1 -1
- package/docs/html/types/LensAbortError.html +6 -5
- package/docs/html/types/LensAssetError.html +2 -2
- package/docs/html/types/LensContentValidationError.html +1 -1
- package/docs/html/types/LensError.html +1 -1
- package/docs/html/types/LensExecutionError.html +6 -5
- package/docs/html/types/LensHttpHandler.html +9 -0
- package/docs/html/types/LensImagePickerError.html +2 -2
- package/docs/html/types/LensLaunchParams.html +2 -2
- package/docs/html/types/LensMetricsEvents.html +2 -2
- package/docs/html/types/LensPerformanceCluster.html +1 -1
- package/docs/html/types/LensView.html +3 -3
- package/docs/html/types/LensWait.html +2 -2
- package/docs/html/types/Matrix.html +2 -2
- package/docs/html/types/PersistentStoreError.html +2 -2
- package/docs/html/types/PlatformNotSupportedError.html +3 -3
- package/docs/html/types/PublicContainer.html +2 -2
- package/docs/html/types/PublicServices.html +2 -2
- package/docs/html/types/RemoteApiCancelRequestHandler.html +2 -2
- package/docs/html/types/RemoteApiRequestHandler.html +2 -2
- package/docs/html/types/RemoteApiServices.html +1 -1
- package/docs/html/types/RemoteApiStatus.html +2 -2
- package/docs/html/types/RenderTarget.html +3 -3
- package/docs/html/types/Uri.html +1 -1
- package/docs/html/types/WebGLError.html +1 -1
- package/docs/html/types/Zodiac.html +1 -1
- package/docs/html/variables/extensionRequestContext.html +3 -2
- package/docs/md/README.md +5 -3
- package/docs/md/classes/CameraKit.md +26 -37
- package/docs/md/classes/CameraKitSession.md +150 -108
- package/docs/md/classes/CameraKitSource.md +46 -37
- package/docs/md/classes/LensPerformanceMeasurement.md +18 -26
- package/docs/md/classes/LensPerformanceMetrics.md +8 -10
- package/docs/md/classes/LensRepository.md +66 -45
- package/docs/md/classes/Transform2D.md +19 -26
- package/docs/md/classes/TypedCustomEvent.md +24 -32
- package/docs/md/classes/TypedEventTarget.md +43 -54
- package/docs/md/enumerations/Lens_CameraFacing.md +31 -0
- package/docs/md/functions/bootstrapCameraKit.md +66 -0
- package/docs/md/functions/createExtension.md +50 -0
- package/docs/md/functions/createImageSource.md +30 -0
- package/docs/md/functions/createMediaStreamSource.md +30 -0
- package/docs/md/functions/createVideoSource.md +31 -0
- package/docs/md/functions/estimateLensPerformance.md +18 -0
- package/docs/md/functions/filePickerFactory.md +22 -0
- package/docs/md/functions/getExtensionRequestContext.md +21 -0
- package/docs/md/functions/lensSourcesFactory.md +37 -0
- package/docs/md/functions/remoteApiServicesFactory.md +19 -0
- package/docs/md/globals.md +124 -0
- package/docs/md/interfaces/BitmojiUserInfo.md +9 -12
- package/docs/md/interfaces/CameraKitBootstrapConfiguration.md +99 -40
- package/docs/md/interfaces/CameraKitDeviceOptions.md +11 -17
- package/docs/md/interfaces/CameraKitSourceInfo.md +14 -20
- package/docs/md/interfaces/CameraKitSourceSubscriber.md +23 -28
- package/docs/md/interfaces/ComputedFrameMetrics.md +13 -19
- package/docs/md/interfaces/CreateSessionOptions.md +10 -13
- package/docs/md/interfaces/EstimatedLensPerformance.md +10 -14
- package/docs/md/interfaces/Font.md +25 -0
- package/docs/md/interfaces/FriendUserInfo.md +12 -16
- package/docs/md/interfaces/FunctionSourceOptions.md +6 -8
- package/docs/md/interfaces/Keyboard.md +137 -0
- package/docs/md/interfaces/KeyboardActiveEvent.md +46 -0
- package/docs/md/interfaces/Lens.md +26 -37
- package/docs/md/interfaces/LensCreator.md +6 -8
- package/docs/md/interfaces/LensHttpRequest.md +60 -0
- package/docs/md/interfaces/LensLaunchData.md +13 -17
- package/docs/md/interfaces/LensSource.md +26 -27
- package/docs/md/interfaces/LensUserData.md +30 -40
- package/docs/md/interfaces/LoadAssetRequest.md +13 -18
- package/docs/md/interfaces/MediaStreamSourceOptions.md +15 -22
- package/docs/md/interfaces/Preview.md +6 -8
- package/docs/md/interfaces/RemoteApiRequest.md +12 -17
- package/docs/md/interfaces/RemoteApiResponse.md +10 -14
- package/docs/md/interfaces/RemoteApiService.md +20 -19
- package/docs/md/interfaces/Snapcode.md +8 -11
- package/docs/md/interfaces/UriCancelRequest.md +7 -10
- package/docs/md/interfaces/UriRequest.md +15 -22
- package/docs/md/interfaces/UriResponse.md +14 -20
- package/docs/md/interfaces/VideoSourceOptions.md +13 -19
- package/docs/md/type-aliases/ArgumentValidationError.md +11 -0
- package/docs/md/type-aliases/AssetLoader.md +26 -0
- package/docs/md/type-aliases/AssetResponse.md +9 -0
- package/docs/md/type-aliases/AssetTiming.md +18 -0
- package/docs/md/type-aliases/BenchmarkError.md +9 -0
- package/docs/md/type-aliases/BootstrapError.md +12 -0
- package/docs/md/type-aliases/CacheKeyNotFoundError.md +9 -0
- package/docs/md/type-aliases/CameraKitSessionEventListener.md +11 -0
- package/docs/md/type-aliases/CameraKitSessionEvents.md +17 -0
- package/docs/md/type-aliases/CameraKitSourceError.md +9 -0
- package/docs/md/type-aliases/ConfigurationError.md +11 -0
- package/docs/md/type-aliases/FetchHandler.md +27 -0
- package/docs/md/type-aliases/FilePicker.md +32 -0
- package/docs/md/type-aliases/FilePickerOptions.md +11 -0
- package/docs/md/type-aliases/FilePickerResult.md +11 -0
- package/docs/md/type-aliases/KeyboardEventListener.md +11 -0
- package/docs/md/type-aliases/KeyboardEvents.md +11 -0
- package/docs/md/type-aliases/LegalError.md +9 -0
- package/docs/md/type-aliases/LensAbortError.md +22 -0
- package/docs/md/type-aliases/LensAssetError.md +11 -0
- package/docs/md/type-aliases/LensContentValidationError.md +9 -0
- package/docs/md/type-aliases/LensError.md +9 -0
- package/docs/md/type-aliases/LensExecutionError.md +23 -0
- package/docs/md/type-aliases/LensHttpHandler.md +41 -0
- package/docs/md/type-aliases/LensImagePickerError.md +12 -0
- package/docs/md/type-aliases/LensLaunchParams.md +11 -0
- package/docs/md/type-aliases/LensMetricsEvents.md +13 -0
- package/docs/md/type-aliases/LensPerformanceCluster.md +9 -0
- package/docs/md/type-aliases/LensView.md +21 -0
- package/docs/md/type-aliases/LensWait.md +13 -0
- package/docs/md/type-aliases/Matrix.md +12 -0
- package/docs/md/type-aliases/PersistentStoreError.md +11 -0
- package/docs/md/type-aliases/PlatformNotSupportedError.md +13 -0
- package/docs/md/type-aliases/PublicContainer.md +12 -0
- package/docs/md/type-aliases/PublicServices.md +11 -0
- package/docs/md/type-aliases/RemoteApiCancelRequestHandler.md +15 -0
- package/docs/md/type-aliases/RemoteApiRequestHandler.md +24 -0
- package/docs/md/type-aliases/RemoteApiServices.md +9 -0
- package/docs/md/type-aliases/RemoteApiStatus.md +11 -0
- package/docs/md/type-aliases/RenderTarget.md +14 -0
- package/docs/md/type-aliases/Uri.md +9 -0
- package/docs/md/type-aliases/WebGLError.md +9 -0
- package/docs/md/type-aliases/Zodiac.md +9 -0
- package/docs/md/variables/extensionRequestContext.md +15 -0
- package/package.json +5 -5
- package/dist/extensions/RemoteApiServices.d.ts.map +0 -1
- package/dist/extensions/RemoteApiServices.js +0 -159
- package/dist/extensions/RemoteApiServices.js.map +0 -1
- package/dist/extensions/UriHandlers.d.ts.map +0 -1
- package/dist/extensions/UriHandlers.js.map +0 -1
- package/dist/extensions/uriHandlersRegister.d.ts.map +0 -1
- package/dist/extensions/uriHandlersRegister.js.map +0 -1
- package/docs/html/types/Keyboard.html +0 -26
- package/docs/md/.nojekyll +0 -1
- package/docs/md/enums/Lens_CameraFacing.md +0 -36
- package/docs/md/modules.md +0 -904
- /package/dist/{extensions → uri-handlers}/UriHandlers.d.ts +0 -0
- /package/dist/{extensions → uri-handlers}/UriHandlers.js +0 -0
|
@@ -1,48 +1,43 @@
|
|
|
1
|
-
[CameraKit Web SDK
|
|
1
|
+
[**CameraKit Web SDK v1.2.0**](../README.md)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Represents a request for loading assets through [AssetLoader](../modules.md#assetloader). This object specifies the asset to be loaded,
|
|
6
|
-
optionally defines the lens context, includes an asset manifest if available, and indicates the priority of the load.
|
|
3
|
+
***
|
|
7
4
|
|
|
8
|
-
|
|
5
|
+
[CameraKit Web SDK](../globals.md) / LoadAssetRequest
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
# Interface: LoadAssetRequest
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- [assetManifest](LoadAssetRequest.md#assetmanifest)
|
|
15
|
-
- [lowPriority](LoadAssetRequest.md#lowpriority)
|
|
9
|
+
Represents a request for loading assets through [AssetLoader](../type-aliases/AssetLoader.md). This object specifies the asset to be loaded,
|
|
10
|
+
optionally defines the lens context, includes an asset manifest if available, and indicates the priority of the load.
|
|
16
11
|
|
|
17
12
|
## Properties
|
|
18
13
|
|
|
19
14
|
### assetDescriptor
|
|
20
15
|
|
|
21
|
-
|
|
16
|
+
> **assetDescriptor**: `AssetDescriptor`
|
|
22
17
|
|
|
23
18
|
Describes the asset to be loaded.
|
|
24
19
|
|
|
25
|
-
|
|
20
|
+
***
|
|
26
21
|
|
|
27
22
|
### lens
|
|
28
23
|
|
|
29
|
-
|
|
24
|
+
> **lens**: `undefined` \| [`Lens`](Lens.md)
|
|
30
25
|
|
|
31
26
|
Specifies the lens context for the asset load, if applicable.
|
|
32
27
|
|
|
33
|
-
|
|
28
|
+
***
|
|
34
29
|
|
|
35
30
|
### assetManifest
|
|
36
31
|
|
|
37
|
-
|
|
32
|
+
> **assetManifest**: `LensAssetManifestItem`[]
|
|
38
33
|
|
|
39
34
|
Lens asset manifest.
|
|
40
35
|
|
|
41
|
-
|
|
36
|
+
***
|
|
42
37
|
|
|
43
38
|
### lowPriority
|
|
44
39
|
|
|
45
|
-
|
|
40
|
+
> **lowPriority**: `boolean`
|
|
46
41
|
|
|
47
42
|
Indicates whether the asset fetch should be treated with lower priority compared to other
|
|
48
43
|
network requests on the page. When set to true, this request may be deferred in favor of higher-priority
|
|
@@ -1,29 +1,22 @@
|
|
|
1
|
-
[CameraKit Web SDK
|
|
1
|
+
[**CameraKit Web SDK v1.2.0**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[CameraKit Web SDK](../globals.md) / MediaStreamSourceOptions
|
|
2
6
|
|
|
3
7
|
# Interface: MediaStreamSourceOptions
|
|
4
8
|
|
|
5
9
|
Media stream source options.
|
|
6
10
|
|
|
7
|
-
##
|
|
11
|
+
## Extends
|
|
8
12
|
|
|
9
13
|
- [`CameraKitDeviceOptions`](CameraKitDeviceOptions.md)
|
|
10
14
|
|
|
11
|
-
↳ **`MediaStreamSourceOptions`**
|
|
12
|
-
|
|
13
|
-
## Table of contents
|
|
14
|
-
|
|
15
|
-
### Properties
|
|
16
|
-
|
|
17
|
-
- [cameraType](MediaStreamSourceOptions.md#cameratype)
|
|
18
|
-
- [fpsLimit](MediaStreamSourceOptions.md#fpslimit)
|
|
19
|
-
- [transform](MediaStreamSourceOptions.md#transform)
|
|
20
|
-
- [disableSourceAudio](MediaStreamSourceOptions.md#disablesourceaudio)
|
|
21
|
-
|
|
22
15
|
## Properties
|
|
23
16
|
|
|
24
17
|
### cameraType
|
|
25
18
|
|
|
26
|
-
|
|
19
|
+
> **cameraType**: `"user"` \| `"environment"`
|
|
27
20
|
|
|
28
21
|
Specifies the camera type for which certain features are enabled or disabled.
|
|
29
22
|
For example, surface tracking features are only active when the camera is set to "environment" mode.
|
|
@@ -32,13 +25,13 @@ The default value is "user", which accommodates the majority of Lenses.
|
|
|
32
25
|
|
|
33
26
|
#### Inherited from
|
|
34
27
|
|
|
35
|
-
[CameraKitDeviceOptions](CameraKitDeviceOptions.md).[cameraType](CameraKitDeviceOptions.md#cameratype)
|
|
28
|
+
[`CameraKitDeviceOptions`](CameraKitDeviceOptions.md).[`cameraType`](CameraKitDeviceOptions.md#cameratype)
|
|
36
29
|
|
|
37
|
-
|
|
30
|
+
***
|
|
38
31
|
|
|
39
32
|
### fpsLimit
|
|
40
33
|
|
|
41
|
-
|
|
34
|
+
> **fpsLimit**: `number`
|
|
42
35
|
|
|
43
36
|
Limits the frames per second (FPS) to optimize performance by reducing compute resources
|
|
44
37
|
when high FPS is not critical. By default, no limit is set, allowing usage of the video's native FPS.
|
|
@@ -46,22 +39,22 @@ Useful for controlling resource usage on varying device capabilities.
|
|
|
46
39
|
|
|
47
40
|
#### Inherited from
|
|
48
41
|
|
|
49
|
-
[CameraKitDeviceOptions](CameraKitDeviceOptions.md).[fpsLimit](CameraKitDeviceOptions.md#fpslimit)
|
|
42
|
+
[`CameraKitDeviceOptions`](CameraKitDeviceOptions.md).[`fpsLimit`](CameraKitDeviceOptions.md#fpslimit)
|
|
50
43
|
|
|
51
|
-
|
|
44
|
+
***
|
|
52
45
|
|
|
53
46
|
### transform
|
|
54
47
|
|
|
55
|
-
|
|
48
|
+
> **transform**: [`Transform2D`](../classes/Transform2D.md)
|
|
56
49
|
|
|
57
50
|
Specifies the 2D transformation to apply to the Lens.
|
|
58
51
|
By default, CameraKit applies no transformation.
|
|
59
52
|
|
|
60
|
-
|
|
53
|
+
***
|
|
61
54
|
|
|
62
55
|
### disableSourceAudio
|
|
63
56
|
|
|
64
|
-
|
|
57
|
+
> **disableSourceAudio**: `boolean`
|
|
65
58
|
|
|
66
59
|
Indicates whether the audio from the source should be disabled.
|
|
67
60
|
By default, CameraKit passes audio to the Lens.
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
[CameraKit Web SDK
|
|
1
|
+
[**CameraKit Web SDK v1.2.0**](../README.md)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Lens preview.
|
|
3
|
+
***
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
[CameraKit Web SDK](../globals.md) / Preview
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
# Interface: Preview
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
Lens preview.
|
|
12
10
|
|
|
13
11
|
## Properties
|
|
14
12
|
|
|
15
13
|
### imageUrl
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
> **imageUrl**: `string`
|
|
18
16
|
|
|
19
17
|
Link to a lens preview image.
|
|
@@ -1,46 +1,41 @@
|
|
|
1
|
-
[CameraKit Web SDK
|
|
1
|
+
[**CameraKit Web SDK v1.2.0**](../README.md)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Remote API request sent by a lens.
|
|
3
|
+
***
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
[CameraKit Web SDK](../globals.md) / RemoteApiRequest
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
# Interface: RemoteApiRequest
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
- [endpointId](RemoteApiRequest.md#endpointid)
|
|
13
|
-
- [parameters](RemoteApiRequest.md#parameters)
|
|
14
|
-
- [body](RemoteApiRequest.md#body)
|
|
9
|
+
Remote API request sent by a lens.
|
|
15
10
|
|
|
16
11
|
## Properties
|
|
17
12
|
|
|
18
13
|
### apiSpecId
|
|
19
14
|
|
|
20
|
-
|
|
15
|
+
> **apiSpecId**: `string`
|
|
21
16
|
|
|
22
17
|
Unique id of the remote API service specification.
|
|
23
18
|
|
|
24
|
-
|
|
19
|
+
***
|
|
25
20
|
|
|
26
21
|
### endpointId
|
|
27
22
|
|
|
28
|
-
|
|
23
|
+
> **endpointId**: `string`
|
|
29
24
|
|
|
30
25
|
Unique id of the remote API service endpoint requested by this request.
|
|
31
26
|
|
|
32
|
-
|
|
27
|
+
***
|
|
33
28
|
|
|
34
29
|
### parameters
|
|
35
30
|
|
|
36
|
-
|
|
31
|
+
> **parameters**: `Record`\<`string`, `string`\>
|
|
37
32
|
|
|
38
33
|
A map of named parameters associated with the request.
|
|
39
34
|
|
|
40
|
-
|
|
35
|
+
***
|
|
41
36
|
|
|
42
37
|
### body
|
|
43
38
|
|
|
44
|
-
|
|
39
|
+
> **body**: `ArrayBuffer`
|
|
45
40
|
|
|
46
41
|
Additional binary request payload.
|
|
@@ -1,37 +1,33 @@
|
|
|
1
|
-
[CameraKit Web SDK
|
|
1
|
+
[**CameraKit Web SDK v1.2.0**](../README.md)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Remote API response to a request sent by a lens.
|
|
3
|
+
***
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
[CameraKit Web SDK](../globals.md) / RemoteApiResponse
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
# Interface: RemoteApiResponse
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
- [metadata](RemoteApiResponse.md#metadata)
|
|
13
|
-
- [body](RemoteApiResponse.md#body)
|
|
9
|
+
Remote API response to a request sent by a lens.
|
|
14
10
|
|
|
15
11
|
## Properties
|
|
16
12
|
|
|
17
13
|
### status
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
> **status**: [`RemoteApiStatus`](../type-aliases/RemoteApiStatus.md)
|
|
20
16
|
|
|
21
17
|
Status of the response
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
***
|
|
24
20
|
|
|
25
21
|
### metadata
|
|
26
22
|
|
|
27
|
-
|
|
23
|
+
> **metadata**: `Record`\<`string`, `string`\>
|
|
28
24
|
|
|
29
25
|
A map of named metadata associated with the response.
|
|
30
26
|
|
|
31
|
-
|
|
27
|
+
***
|
|
32
28
|
|
|
33
29
|
### body
|
|
34
30
|
|
|
35
|
-
|
|
31
|
+
> **body**: `ArrayBuffer`
|
|
36
32
|
|
|
37
33
|
Additional binary request payload.
|
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
[CameraKit Web SDK
|
|
1
|
+
[**CameraKit Web SDK v1.2.0**](../README.md)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Service to handle a lens Remote API request.
|
|
3
|
+
***
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
[CameraKit Web SDK](../globals.md) / RemoteApiService
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- [apiSpecId](RemoteApiService.md#apispecid)
|
|
12
|
-
|
|
13
|
-
### Methods
|
|
7
|
+
# Interface: RemoteApiService
|
|
14
8
|
|
|
15
|
-
|
|
9
|
+
Service to handle a lens Remote API request.
|
|
16
10
|
|
|
17
11
|
## Properties
|
|
18
12
|
|
|
19
13
|
### apiSpecId
|
|
20
14
|
|
|
21
|
-
|
|
15
|
+
> **apiSpecId**: `string`
|
|
22
16
|
|
|
23
17
|
Remote API spec ID(s).
|
|
24
18
|
|
|
25
19
|
## Methods
|
|
26
20
|
|
|
27
|
-
### getRequestHandler
|
|
21
|
+
### getRequestHandler()
|
|
28
22
|
|
|
29
|
-
|
|
23
|
+
> **getRequestHandler**(`request`, `lens`): `undefined` \| [`RemoteApiRequestHandler`](../type-aliases/RemoteApiRequestHandler.md)
|
|
30
24
|
|
|
31
25
|
This method is called by Camera Kit when a lens triggers a Remote API request with a corresponding spec ID.
|
|
32
26
|
If the service can handle the request, the method returns a request handler; otherwise, it returns nothing.
|
|
33
27
|
|
|
34
28
|
#### Parameters
|
|
35
29
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
##### request
|
|
31
|
+
|
|
32
|
+
[`RemoteApiRequest`](RemoteApiRequest.md)
|
|
33
|
+
|
|
34
|
+
Remote API request object.
|
|
35
|
+
|
|
36
|
+
##### lens
|
|
37
|
+
|
|
38
|
+
[`Lens`](Lens.md)
|
|
39
|
+
|
|
40
|
+
Lens that triggers the request.
|
|
40
41
|
|
|
41
42
|
#### Returns
|
|
42
43
|
|
|
43
|
-
`undefined` \| [`RemoteApiRequestHandler`](../
|
|
44
|
+
`undefined` \| [`RemoteApiRequestHandler`](../type-aliases/RemoteApiRequestHandler.md)
|
|
44
45
|
|
|
45
46
|
A request handler if applicable.
|
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
[CameraKit Web SDK
|
|
1
|
+
[**CameraKit Web SDK v1.2.0**](../README.md)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[Snapcode](https://scan.snapchat.com/snapcodes) representing a lens.
|
|
3
|
+
***
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
[CameraKit Web SDK](../globals.md) / Snapcode
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
# Interface: Snapcode
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
- [deepLink](Snapcode.md#deeplink)
|
|
9
|
+
[Snapcode](https://scan.snapchat.com/snapcodes) representing a lens.
|
|
13
10
|
|
|
14
11
|
## Properties
|
|
15
12
|
|
|
16
13
|
### imageUrl
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
> **imageUrl**: `string`
|
|
19
16
|
|
|
20
17
|
Snapcode image URL scannable with Snapchat app.
|
|
21
18
|
|
|
22
|
-
|
|
19
|
+
***
|
|
23
20
|
|
|
24
21
|
### deepLink
|
|
25
22
|
|
|
26
|
-
|
|
23
|
+
> **deepLink**: `string`
|
|
27
24
|
|
|
28
25
|
Deeplink URL that directs to a lens web page.
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
[CameraKit Web SDK
|
|
1
|
+
[**CameraKit Web SDK v1.2.0**](../README.md)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Table of contents
|
|
3
|
+
***
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
[CameraKit Web SDK](../globals.md) / UriCancelRequest
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
- [requestId](UriCancelRequest.md#requestid)
|
|
7
|
+
# Interface: UriCancelRequest
|
|
11
8
|
|
|
12
9
|
## Properties
|
|
13
10
|
|
|
14
11
|
### uri
|
|
15
12
|
|
|
16
|
-
|
|
13
|
+
> **uri**: \`$\{string\}://$\{string\}\`
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
***
|
|
19
16
|
|
|
20
17
|
### requestId
|
|
21
18
|
|
|
22
|
-
|
|
19
|
+
> **requestId**: `string`
|
|
@@ -1,50 +1,43 @@
|
|
|
1
|
-
[CameraKit Web SDK
|
|
1
|
+
[**CameraKit Web SDK v1.2.0**](../README.md)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Table of contents
|
|
3
|
+
***
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
[CameraKit Web SDK](../globals.md) / UriRequest
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
- [identifier](UriRequest.md#identifier)
|
|
11
|
-
- [method](UriRequest.md#method)
|
|
12
|
-
- [contentType](UriRequest.md#contenttype)
|
|
13
|
-
- [data](UriRequest.md#data)
|
|
14
|
-
- [metadata](UriRequest.md#metadata)
|
|
7
|
+
# Interface: UriRequest
|
|
15
8
|
|
|
16
9
|
## Properties
|
|
17
10
|
|
|
18
11
|
### uri
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
> **uri**: \`$\{string\}://$\{string\}\`
|
|
21
14
|
|
|
22
|
-
|
|
15
|
+
***
|
|
23
16
|
|
|
24
17
|
### identifier
|
|
25
18
|
|
|
26
|
-
|
|
19
|
+
> **identifier**: `string`
|
|
27
20
|
|
|
28
|
-
|
|
21
|
+
***
|
|
29
22
|
|
|
30
23
|
### method
|
|
31
24
|
|
|
32
|
-
|
|
25
|
+
> **method**: `"POST"` \| `"GET"`
|
|
33
26
|
|
|
34
|
-
|
|
27
|
+
***
|
|
35
28
|
|
|
36
29
|
### contentType
|
|
37
30
|
|
|
38
|
-
|
|
31
|
+
> **contentType**: `ContentType`
|
|
39
32
|
|
|
40
|
-
|
|
33
|
+
***
|
|
41
34
|
|
|
42
35
|
### data
|
|
43
36
|
|
|
44
|
-
|
|
37
|
+
> **data**: `ArrayBuffer`
|
|
45
38
|
|
|
46
|
-
|
|
39
|
+
***
|
|
47
40
|
|
|
48
41
|
### metadata
|
|
49
42
|
|
|
50
|
-
|
|
43
|
+
> **metadata**: `Record`\<`string`, `string`\>
|
|
@@ -1,43 +1,37 @@
|
|
|
1
|
-
[CameraKit Web SDK
|
|
1
|
+
[**CameraKit Web SDK v1.2.0**](../README.md)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Table of contents
|
|
3
|
+
***
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
[CameraKit Web SDK](../globals.md) / UriResponse
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
- [description](UriResponse.md#description)
|
|
11
|
-
- [contentType](UriResponse.md#contenttype)
|
|
12
|
-
- [data](UriResponse.md#data)
|
|
13
|
-
- [metadata](UriResponse.md#metadata)
|
|
7
|
+
# Interface: UriResponse
|
|
14
8
|
|
|
15
9
|
## Properties
|
|
16
10
|
|
|
17
11
|
### code
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
> **code**: `number`
|
|
20
14
|
|
|
21
|
-
|
|
15
|
+
***
|
|
22
16
|
|
|
23
17
|
### description
|
|
24
18
|
|
|
25
|
-
|
|
19
|
+
> **description**: `string`
|
|
26
20
|
|
|
27
|
-
|
|
21
|
+
***
|
|
28
22
|
|
|
29
23
|
### contentType
|
|
30
24
|
|
|
31
|
-
|
|
25
|
+
> **contentType**: `ContentType`
|
|
32
26
|
|
|
33
|
-
|
|
27
|
+
***
|
|
34
28
|
|
|
35
29
|
### data
|
|
36
30
|
|
|
37
|
-
|
|
31
|
+
> **data**: `ArrayBuffer`
|
|
38
32
|
|
|
39
|
-
|
|
33
|
+
***
|
|
40
34
|
|
|
41
|
-
### metadata
|
|
35
|
+
### metadata?
|
|
42
36
|
|
|
43
|
-
|
|
37
|
+
> `optional` **metadata**: `Record`\<`string`, `string`\>
|
|
@@ -1,28 +1,22 @@
|
|
|
1
|
-
[CameraKit Web SDK
|
|
1
|
+
[**CameraKit Web SDK v1.2.0**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[CameraKit Web SDK](../globals.md) / VideoSourceOptions
|
|
2
6
|
|
|
3
7
|
# Interface: VideoSourceOptions
|
|
4
8
|
|
|
5
9
|
Video source options.
|
|
6
10
|
|
|
7
|
-
##
|
|
11
|
+
## Extends
|
|
8
12
|
|
|
9
13
|
- [`CameraKitDeviceOptions`](CameraKitDeviceOptions.md)
|
|
10
14
|
|
|
11
|
-
↳ **`VideoSourceOptions`**
|
|
12
|
-
|
|
13
|
-
## Table of contents
|
|
14
|
-
|
|
15
|
-
### Properties
|
|
16
|
-
|
|
17
|
-
- [cameraType](VideoSourceOptions.md#cameratype)
|
|
18
|
-
- [fpsLimit](VideoSourceOptions.md#fpslimit)
|
|
19
|
-
- [trackingData](VideoSourceOptions.md#trackingdata)
|
|
20
|
-
|
|
21
15
|
## Properties
|
|
22
16
|
|
|
23
17
|
### cameraType
|
|
24
18
|
|
|
25
|
-
|
|
19
|
+
> **cameraType**: `"user"` \| `"environment"`
|
|
26
20
|
|
|
27
21
|
Specifies the camera type for which certain features are enabled or disabled.
|
|
28
22
|
For example, surface tracking features are only active when the camera is set to "environment" mode.
|
|
@@ -31,13 +25,13 @@ The default value is "user", which accommodates the majority of Lenses.
|
|
|
31
25
|
|
|
32
26
|
#### Inherited from
|
|
33
27
|
|
|
34
|
-
[CameraKitDeviceOptions](CameraKitDeviceOptions.md).[cameraType](CameraKitDeviceOptions.md#cameratype)
|
|
28
|
+
[`CameraKitDeviceOptions`](CameraKitDeviceOptions.md).[`cameraType`](CameraKitDeviceOptions.md#cameratype)
|
|
35
29
|
|
|
36
|
-
|
|
30
|
+
***
|
|
37
31
|
|
|
38
32
|
### fpsLimit
|
|
39
33
|
|
|
40
|
-
|
|
34
|
+
> **fpsLimit**: `number`
|
|
41
35
|
|
|
42
36
|
Limits the frames per second (FPS) to optimize performance by reducing compute resources
|
|
43
37
|
when high FPS is not critical. By default, no limit is set, allowing usage of the video's native FPS.
|
|
@@ -45,13 +39,13 @@ Useful for controlling resource usage on varying device capabilities.
|
|
|
45
39
|
|
|
46
40
|
#### Inherited from
|
|
47
41
|
|
|
48
|
-
[CameraKitDeviceOptions](CameraKitDeviceOptions.md).[fpsLimit](CameraKitDeviceOptions.md#fpslimit)
|
|
42
|
+
[`CameraKitDeviceOptions`](CameraKitDeviceOptions.md).[`fpsLimit`](CameraKitDeviceOptions.md#fpslimit)
|
|
49
43
|
|
|
50
|
-
|
|
44
|
+
***
|
|
51
45
|
|
|
52
46
|
### trackingData
|
|
53
47
|
|
|
54
|
-
|
|
48
|
+
> **trackingData**: `ArrayBuffer`
|
|
55
49
|
|
|
56
50
|
Optional pre-computed tracking data to enhance rendering performance.
|
|
57
51
|
While not commonly provided, this can be used in specific scenarios
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[**CameraKit Web SDK v1.2.0**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[CameraKit Web SDK](../globals.md) / ArgumentValidationError
|
|
6
|
+
|
|
7
|
+
# Type Alias: ArgumentValidationError
|
|
8
|
+
|
|
9
|
+
> **ArgumentValidationError**: `NamedError`\<`"ArgumentValidationError"`\>
|
|
10
|
+
|
|
11
|
+
Thrown when a method receives an argument with an unexpected value.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[**CameraKit Web SDK v1.2.0**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[CameraKit Web SDK](../globals.md) / AssetLoader
|
|
6
|
+
|
|
7
|
+
# Type Alias: AssetLoader()
|
|
8
|
+
|
|
9
|
+
> **AssetLoader**: (`request`) => `Promise`\<[`AssetResponse`](AssetResponse.md)\> \| [`AssetResponse`](AssetResponse.md)
|
|
10
|
+
|
|
11
|
+
An AssetLoader is used to retrieve assets. A separate loader may be defined to retrieve different asset types.
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
### request
|
|
16
|
+
|
|
17
|
+
[`LoadAssetRequest`](../interfaces/LoadAssetRequest.md)
|
|
18
|
+
|
|
19
|
+
The [LoadAssetRequest](../interfaces/LoadAssetRequest.md) detailing the asset to be loaded, its context, and loading priority.
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`Promise`\<[`AssetResponse`](AssetResponse.md)\> \| [`AssetResponse`](AssetResponse.md)
|
|
24
|
+
|
|
25
|
+
A promise that resolves to an [AssetResponse](AssetResponse.md) for asynchronous loading,
|
|
26
|
+
or an [AssetResponse](AssetResponse.md) directly for synchronous operations.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[**CameraKit Web SDK v1.2.0**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[CameraKit Web SDK](../globals.md) / AssetTiming
|
|
6
|
+
|
|
7
|
+
# Type Alias: AssetTiming
|
|
8
|
+
|
|
9
|
+
> **AssetTiming**: `"required"` \| `"onDemand"`
|
|
10
|
+
|
|
11
|
+
Lens assets are included in a manifest, and each will indicate when that asset will be used by the lens.
|
|
12
|
+
|
|
13
|
+
Assets can have the following timing values:
|
|
14
|
+
- `required`: the lens will definitely request this asset immediately when the lens is applied.
|
|
15
|
+
- `onDemand`: the lens may request this asset at some time while the lens is applied.
|
|
16
|
+
|
|
17
|
+
Depending on the use-case, an application may want to cache both required and onDemand assets for
|
|
18
|
+
a particular lens, or may decide to only cache required assets (or cache no assets).
|