@snap/camera-kit 0.7.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.
Files changed (554) hide show
  1. package/LICENSE.md +6247 -0
  2. package/README.md +166 -0
  3. package/docs/html/.nojekyll +1 -0
  4. package/docs/html/assets/highlight.css +106 -0
  5. package/docs/html/assets/main.js +54 -0
  6. package/docs/html/assets/search.js +1 -0
  7. package/docs/html/assets/style.css +1225 -0
  8. package/docs/html/assets/widgets.png +0 -0
  9. package/docs/html/assets/widgets@2x.png +0 -0
  10. package/docs/html/classes/CameraKit.html +121 -0
  11. package/docs/html/classes/CameraKitSession.html +347 -0
  12. package/docs/html/classes/CameraKitSource.html +152 -0
  13. package/docs/html/classes/LensPerformanceMeasurement.html +115 -0
  14. package/docs/html/classes/LensPerformanceMetrics.html +76 -0
  15. package/docs/html/classes/LensRepository.html +171 -0
  16. package/docs/html/classes/LensSources.html +82 -0
  17. package/docs/html/classes/Transform2D.html +99 -0
  18. package/docs/html/classes/TypedCustomEvent.html +109 -0
  19. package/docs/html/classes/TypedEventTarget.html +146 -0
  20. package/docs/html/functions/Injectable.html +193 -0
  21. package/docs/html/functions/bootstrapCameraKit.html +158 -0
  22. package/docs/html/functions/createExtension.html +127 -0
  23. package/docs/html/functions/createImageSource.html +123 -0
  24. package/docs/html/functions/createMediaStreamSource.html +123 -0
  25. package/docs/html/functions/createUserMediaSource.html +127 -0
  26. package/docs/html/functions/createVideoSource.html +124 -0
  27. package/docs/html/functions/estimateLensPerformance.html +116 -0
  28. package/docs/html/functions/getRequiredBootstrapURLs.html +124 -0
  29. package/docs/html/functions/lensSourcesFactory.html +116 -0
  30. package/docs/html/functions/uriHandlersFactory.html +118 -0
  31. package/docs/html/index.html +208 -0
  32. package/docs/html/interfaces/CameraKitBootstrapConfiguration.html +132 -0
  33. package/docs/html/interfaces/CameraKitSourceSubscriber.html +121 -0
  34. package/docs/html/interfaces/ComputedFrameMetrics.html +70 -0
  35. package/docs/html/interfaces/CreateSessionOptions.html +77 -0
  36. package/docs/html/interfaces/EstimatedLensPerformance.html +78 -0
  37. package/docs/html/interfaces/Lens.html +115 -0
  38. package/docs/html/interfaces/LensSource.html +113 -0
  39. package/docs/html/interfaces/MediaStreamSourceOptions.html +65 -0
  40. package/docs/html/interfaces/UriCancelRequest.html +65 -0
  41. package/docs/html/interfaces/UriHandler.html +128 -0
  42. package/docs/html/interfaces/UriRequest.html +80 -0
  43. package/docs/html/interfaces/UriResponse.html +80 -0
  44. package/docs/html/interfaces/VideoSourceOptions.html +60 -0
  45. package/docs/html/modules.html +198 -0
  46. package/docs/html/types/AssetLoader.html +126 -0
  47. package/docs/html/types/AssetTiming.html +116 -0
  48. package/docs/html/types/BenchmarkError.html +107 -0
  49. package/docs/html/types/BootstrapError.html +110 -0
  50. package/docs/html/types/CacheKeyNotFoundError.html +107 -0
  51. package/docs/html/types/CameraKitDeviceInfo.html +114 -0
  52. package/docs/html/types/CameraKitSessionEventListener.html +109 -0
  53. package/docs/html/types/CameraKitSessionEvents.html +118 -0
  54. package/docs/html/types/CameraKitSourceError.html +107 -0
  55. package/docs/html/types/CameraKitSourceInfo.html +107 -0
  56. package/docs/html/types/CameraKitSourceOptions.html +113 -0
  57. package/docs/html/types/ConfigurationError.html +109 -0
  58. package/docs/html/types/Keyboard.html +196 -0
  59. package/docs/html/types/KeyboardEvents.html +109 -0
  60. package/docs/html/types/LegalError.html +107 -0
  61. package/docs/html/types/LensAssetError.html +109 -0
  62. package/docs/html/types/LensContentValidationError.html +107 -0
  63. package/docs/html/types/LensError.html +107 -0
  64. package/docs/html/types/LensExecutionError.html +114 -0
  65. package/docs/html/types/LensImagePickerError.html +110 -0
  66. package/docs/html/types/LensLaunchParams.html +109 -0
  67. package/docs/html/types/LensMetricsEvents.html +110 -0
  68. package/docs/html/types/LensPerformanceCluster.html +107 -0
  69. package/docs/html/types/LensView.html +119 -0
  70. package/docs/html/types/LensWait.html +111 -0
  71. package/docs/html/types/PersistentStoreError.html +109 -0
  72. package/docs/html/types/PlatformNotSupportedError.html +110 -0
  73. package/docs/html/types/PublicContainer.html +110 -0
  74. package/docs/html/types/RenderTarget.html +111 -0
  75. package/docs/html/types/Uri.html +107 -0
  76. package/docs/html/types/UriHandlers.html +109 -0
  77. package/docs/html/types/WebGLError.html +107 -0
  78. package/docs/html/variables/extensionRequestContext.html +109 -0
  79. package/docs/md/.nojekyll +1 -0
  80. package/docs/md/README.md +168 -0
  81. package/docs/md/classes/CameraKit.md +94 -0
  82. package/docs/md/classes/CameraKitSession.md +359 -0
  83. package/docs/md/classes/CameraKitSource.md +110 -0
  84. package/docs/md/classes/LensPerformanceMeasurement.md +77 -0
  85. package/docs/md/classes/LensPerformanceMetrics.md +37 -0
  86. package/docs/md/classes/LensRepository.md +145 -0
  87. package/docs/md/classes/LensSources.md +29 -0
  88. package/docs/md/classes/Transform2D.md +55 -0
  89. package/docs/md/classes/TypedCustomEvent.md +65 -0
  90. package/docs/md/classes/TypedEventTarget.md +103 -0
  91. package/docs/md/interfaces/CameraKitBootstrapConfiguration.md +106 -0
  92. package/docs/md/interfaces/CameraKitSourceSubscriber.md +55 -0
  93. package/docs/md/interfaces/ComputedFrameMetrics.md +29 -0
  94. package/docs/md/interfaces/CreateSessionOptions.md +35 -0
  95. package/docs/md/interfaces/EstimatedLensPerformance.md +38 -0
  96. package/docs/md/interfaces/Lens.md +84 -0
  97. package/docs/md/interfaces/LensSource.md +68 -0
  98. package/docs/md/interfaces/MediaStreamSourceOptions.md +22 -0
  99. package/docs/md/interfaces/UriCancelRequest.md +22 -0
  100. package/docs/md/interfaces/UriHandler.md +63 -0
  101. package/docs/md/interfaces/UriRequest.md +43 -0
  102. package/docs/md/interfaces/UriResponse.md +43 -0
  103. package/docs/md/interfaces/VideoSourceOptions.md +15 -0
  104. package/docs/md/modules.md +827 -0
  105. package/lib/CameraKit.d.ts +170 -0
  106. package/lib/CameraKit.js +145 -0
  107. package/lib/CameraKit.js.map +1 -0
  108. package/lib/__tests__/data.d.ts +9 -0
  109. package/lib/__tests__/data.js +50 -0
  110. package/lib/__tests__/data.js.map +1 -0
  111. package/lib/__tests__/deferred.d.ts +16 -0
  112. package/lib/__tests__/deferred.js +29 -0
  113. package/lib/__tests__/deferred.js.map +1 -0
  114. package/lib/__tests__/jest.matchers.d.ts +17 -0
  115. package/lib/__tests__/jest.matchers.js +67 -0
  116. package/lib/__tests__/jest.matchers.js.map +1 -0
  117. package/lib/assertPlatformSupported.d.ts +4 -0
  118. package/lib/assertPlatformSupported.js +10 -0
  119. package/lib/assertPlatformSupported.js.map +1 -0
  120. package/lib/benchmark/benchmarkGflops.d.ts +16 -0
  121. package/lib/benchmark/benchmarkGflops.js +129 -0
  122. package/lib/benchmark/benchmarkGflops.js.map +1 -0
  123. package/lib/benchmark/estimateLensPerformanceCluster.d.ts +33 -0
  124. package/lib/benchmark/estimateLensPerformanceCluster.js +48 -0
  125. package/lib/benchmark/estimateLensPerformanceCluster.js.map +1 -0
  126. package/lib/benchmark/webglUtils.d.ts +7 -0
  127. package/lib/benchmark/webglUtils.js +87 -0
  128. package/lib/benchmark/webglUtils.js.map +1 -0
  129. package/lib/bootstrapCameraKit.d.ts +96 -0
  130. package/lib/bootstrapCameraKit.js +204 -0
  131. package/lib/bootstrapCameraKit.js.map +1 -0
  132. package/lib/common/__mocks__/loadScript.d.ts +1 -0
  133. package/lib/common/__mocks__/loadScript.js +10 -0
  134. package/lib/common/__mocks__/loadScript.js.map +1 -0
  135. package/lib/common/assertions.d.ts +27 -0
  136. package/lib/common/assertions.js +39 -0
  137. package/lib/common/assertions.js.map +1 -0
  138. package/lib/common/cameraKitUserAgent.d.ts +34 -0
  139. package/lib/common/cameraKitUserAgent.js +216 -0
  140. package/lib/common/cameraKitUserAgent.js.map +1 -0
  141. package/lib/common/copyDefinedProperties.d.ts +13 -0
  142. package/lib/common/copyDefinedProperties.js +16 -0
  143. package/lib/common/copyDefinedProperties.js.map +1 -0
  144. package/lib/common/entries.d.ts +3 -0
  145. package/lib/common/entries.js +3 -0
  146. package/lib/common/entries.js.map +1 -0
  147. package/lib/common/errorHelpers.d.ts +10 -0
  148. package/lib/common/errorHelpers.js +24 -0
  149. package/lib/common/errorHelpers.js.map +1 -0
  150. package/lib/common/getFilename.d.ts +1 -0
  151. package/lib/common/getFilename.js +4 -0
  152. package/lib/common/getFilename.js.map +1 -0
  153. package/lib/common/index.d.ts +2 -0
  154. package/lib/common/index.js +3 -0
  155. package/lib/common/index.js.map +1 -0
  156. package/lib/common/loadScript.d.ts +1 -0
  157. package/lib/common/loadScript.js +11 -0
  158. package/lib/common/loadScript.js.map +1 -0
  159. package/lib/common/locale.d.ts +2 -0
  160. package/lib/common/locale.js +11 -0
  161. package/lib/common/locale.js.map +1 -0
  162. package/lib/common/localization.d.ts +43 -0
  163. package/lib/common/localization.js +43 -0
  164. package/lib/common/localization.js.map +1 -0
  165. package/lib/common/memoize.d.ts +8 -0
  166. package/lib/common/memoize.js +15 -0
  167. package/lib/common/memoize.js.map +1 -0
  168. package/lib/common/pageVisibility.d.ts +20 -0
  169. package/lib/common/pageVisibility.js +62 -0
  170. package/lib/common/pageVisibility.js.map +1 -0
  171. package/lib/common/time.d.ts +1 -0
  172. package/lib/common/time.js +2 -0
  173. package/lib/common/time.js.map +1 -0
  174. package/lib/common/typeguards.d.ts +53 -0
  175. package/lib/common/typeguards.js +92 -0
  176. package/lib/common/typeguards.js.map +1 -0
  177. package/lib/common/types.d.ts +10 -0
  178. package/lib/common/types.js +2 -0
  179. package/lib/common/types.js.map +1 -0
  180. package/lib/common/validate.d.ts +14 -0
  181. package/lib/common/validate.js +104 -0
  182. package/lib/common/validate.js.map +1 -0
  183. package/lib/configuration.d.ts +92 -0
  184. package/lib/configuration.js +36 -0
  185. package/lib/configuration.js.map +1 -0
  186. package/lib/configurationOverrides.d.ts +12 -0
  187. package/lib/configurationOverrides.js +41 -0
  188. package/lib/configurationOverrides.js.map +1 -0
  189. package/lib/dependency-injection/Container.d.ts +177 -0
  190. package/lib/dependency-injection/Container.js +160 -0
  191. package/lib/dependency-injection/Container.js.map +1 -0
  192. package/lib/dependency-injection/Injectable.d.ts +39 -0
  193. package/lib/dependency-injection/Injectable.js +18 -0
  194. package/lib/dependency-injection/Injectable.js.map +1 -0
  195. package/lib/dependency-injection/PartialContainer.d.ts +81 -0
  196. package/lib/dependency-injection/PartialContainer.js +85 -0
  197. package/lib/dependency-injection/PartialContainer.js.map +1 -0
  198. package/lib/dependency-injection/RootServices.d.ts +62 -0
  199. package/lib/dependency-injection/RootServices.js +2 -0
  200. package/lib/dependency-injection/RootServices.js.map +1 -0
  201. package/lib/dependency-injection/types.d.ts +56 -0
  202. package/lib/dependency-injection/types.js +2 -0
  203. package/lib/dependency-injection/types.js.map +1 -0
  204. package/lib/environment.json +1 -0
  205. package/lib/events/TypedCustomEvent.d.ts +10 -0
  206. package/lib/events/TypedCustomEvent.js +11 -0
  207. package/lib/events/TypedCustomEvent.js.map +1 -0
  208. package/lib/events/TypedEventTarget.d.ts +25 -0
  209. package/lib/events/TypedEventTarget.js +57 -0
  210. package/lib/events/TypedEventTarget.js.map +1 -0
  211. package/lib/events/scan.d.ts +15 -0
  212. package/lib/events/scan.js +46 -0
  213. package/lib/events/scan.js.map +1 -0
  214. package/lib/extensions/LensSources.d.ts +58 -0
  215. package/lib/extensions/LensSources.js +50 -0
  216. package/lib/extensions/LensSources.js.map +1 -0
  217. package/lib/extensions/UriHandlers.d.ts +54 -0
  218. package/lib/extensions/UriHandlers.js +93 -0
  219. package/lib/extensions/UriHandlers.js.map +1 -0
  220. package/lib/extensions/extensionRequestContext.d.ts +4 -0
  221. package/lib/extensions/extensionRequestContext.js +14 -0
  222. package/lib/extensions/extensionRequestContext.js.map +1 -0
  223. package/lib/generated-proto/blizzard/cameraKitEvents.d.ts +5603 -0
  224. package/lib/generated-proto/blizzard/cameraKitEvents.js +522 -0
  225. package/lib/generated-proto/blizzard/cameraKitEvents.js.map +1 -0
  226. package/lib/generated-proto/pb_schema/camera_kit/v3/business_events.d.ts +98 -0
  227. package/lib/generated-proto/pb_schema/camera_kit/v3/business_events.js +260 -0
  228. package/lib/generated-proto/pb_schema/camera_kit/v3/business_events.js.map +1 -0
  229. package/lib/generated-proto/pb_schema/camera_kit/v3/export.d.ts +543 -0
  230. package/lib/generated-proto/pb_schema/camera_kit/v3/export.js +429 -0
  231. package/lib/generated-proto/pb_schema/camera_kit/v3/export.js.map +1 -0
  232. package/lib/generated-proto/pb_schema/camera_kit/v3/legal_prompt.d.ts +100 -0
  233. package/lib/generated-proto/pb_schema/camera_kit/v3/legal_prompt.js +164 -0
  234. package/lib/generated-proto/pb_schema/camera_kit/v3/legal_prompt.js.map +1 -0
  235. package/lib/generated-proto/pb_schema/camera_kit/v3/lens.d.ts +395 -0
  236. package/lib/generated-proto/pb_schema/camera_kit/v3/lens.js +644 -0
  237. package/lib/generated-proto/pb_schema/camera_kit/v3/lens.js.map +1 -0
  238. package/lib/generated-proto/pb_schema/camera_kit/v3/operational_metrics.d.ts +185 -0
  239. package/lib/generated-proto/pb_schema/camera_kit/v3/operational_metrics.js +172 -0
  240. package/lib/generated-proto/pb_schema/camera_kit/v3/operational_metrics.js.map +1 -0
  241. package/lib/generated-proto/pb_schema/camera_kit/v3/ranking.d.ts +86 -0
  242. package/lib/generated-proto/pb_schema/camera_kit/v3/ranking.js +234 -0
  243. package/lib/generated-proto/pb_schema/camera_kit/v3/ranking.js.map +1 -0
  244. package/lib/generated-proto/pb_schema/camera_kit/v3/service.d.ts +854 -0
  245. package/lib/generated-proto/pb_schema/camera_kit/v3/service.js +629 -0
  246. package/lib/generated-proto/pb_schema/camera_kit/v3/service.js.map +1 -0
  247. package/lib/generated-proto/pb_schema/cdp/cof/benchmark.d.ts +86 -0
  248. package/lib/generated-proto/pb_schema/cdp/cof/benchmark.js +185 -0
  249. package/lib/generated-proto/pb_schema/cdp/cof/benchmark.js.map +1 -0
  250. package/lib/generated-proto/pb_schema/cdp/cof/benchmark_name.d.ts +95 -0
  251. package/lib/generated-proto/pb_schema/cdp/cof/benchmark_name.js +104 -0
  252. package/lib/generated-proto/pb_schema/cdp/cof/benchmark_name.js.map +1 -0
  253. package/lib/generated-proto/pb_schema/cdp/cof/circumstance_service.d.ts +10212 -0
  254. package/lib/generated-proto/pb_schema/cdp/cof/circumstance_service.js +1300 -0
  255. package/lib/generated-proto/pb_schema/cdp/cof/circumstance_service.js.map +1 -0
  256. package/lib/generated-proto/pb_schema/cdp/cof/config_request.d.ts +401 -0
  257. package/lib/generated-proto/pb_schema/cdp/cof/config_request.js +525 -0
  258. package/lib/generated-proto/pb_schema/cdp/cof/config_request.js.map +1 -0
  259. package/lib/generated-proto/pb_schema/cdp/cof/config_response.d.ts +1287 -0
  260. package/lib/generated-proto/pb_schema/cdp/cof/config_response.js +135 -0
  261. package/lib/generated-proto/pb_schema/cdp/cof/config_response.js.map +1 -0
  262. package/lib/generated-proto/pb_schema/cdp/cof/config_result.d.ts +4208 -0
  263. package/lib/generated-proto/pb_schema/cdp/cof/config_result.js +1053 -0
  264. package/lib/generated-proto/pb_schema/cdp/cof/config_result.js.map +1 -0
  265. package/lib/generated-proto/pb_schema/cdp/cof/debug_info.d.ts +102 -0
  266. package/lib/generated-proto/pb_schema/cdp/cof/debug_info.js +165 -0
  267. package/lib/generated-proto/pb_schema/cdp/cof/debug_info.js.map +1 -0
  268. package/lib/generated-proto/pb_schema/cdp/cof/namespace.d.ts +8 -0
  269. package/lib/generated-proto/pb_schema/cdp/cof/namespace.js +17 -0
  270. package/lib/generated-proto/pb_schema/cdp/cof/namespace.js.map +1 -0
  271. package/lib/generated-proto/pb_schema/common/ruid.d.ts +75 -0
  272. package/lib/generated-proto/pb_schema/common/ruid.js +96 -0
  273. package/lib/generated-proto/pb_schema/common/ruid.js.map +1 -0
  274. package/lib/generated-proto/pb_schema/common/value.d.ts +131 -0
  275. package/lib/generated-proto/pb_schema/common/value.js +204 -0
  276. package/lib/generated-proto/pb_schema/common/value.js.map +1 -0
  277. package/lib/generated-proto/pb_schema/google/api/annotations.d.ts +1 -0
  278. package/lib/generated-proto/pb_schema/google/api/annotations.js +9 -0
  279. package/lib/generated-proto/pb_schema/google/api/annotations.js.map +1 -0
  280. package/lib/generated-proto/pb_schema/google/api/http.d.ts +3636 -0
  281. package/lib/generated-proto/pb_schema/google/api/http.js +271 -0
  282. package/lib/generated-proto/pb_schema/google/api/http.js.map +1 -0
  283. package/lib/generated-proto/pb_schema/google/protobuf/any.d.ts +139 -0
  284. package/lib/generated-proto/pb_schema/google/protobuf/any.js +94 -0
  285. package/lib/generated-proto/pb_schema/google/protobuf/any.js.map +1 -0
  286. package/lib/generated-proto/pb_schema/google/protobuf/descriptor.d.ts +50968 -0
  287. package/lib/generated-proto/pb_schema/google/protobuf/descriptor.js +2962 -0
  288. package/lib/generated-proto/pb_schema/google/protobuf/descriptor.js.map +1 -0
  289. package/lib/generated-proto/pb_schema/google/protobuf/timestamp.d.ts +98 -0
  290. package/lib/generated-proto/pb_schema/google/protobuf/timestamp.js +82 -0
  291. package/lib/generated-proto/pb_schema/google/protobuf/timestamp.js.map +1 -0
  292. package/lib/generated-proto/pb_schema/google/protobuf/wrappers.d.ts +173 -0
  293. package/lib/generated-proto/pb_schema/google/protobuf/wrappers.js +332 -0
  294. package/lib/generated-proto/pb_schema/google/protobuf/wrappers.js.map +1 -0
  295. package/lib/generated-proto/pb_schema/lenses/geocircle.d.ts +42 -0
  296. package/lib/generated-proto/pb_schema/lenses/geocircle.js +52 -0
  297. package/lib/generated-proto/pb_schema/lenses/geocircle.js.map +1 -0
  298. package/lib/generated-proto/pb_schema/lenses/geopoint.d.ts +32 -0
  299. package/lib/generated-proto/pb_schema/lenses/geopoint.js +50 -0
  300. package/lib/generated-proto/pb_schema/lenses/geopoint.js.map +1 -0
  301. package/lib/generated-proto/pb_schema/lenses/launch_params.d.ts +29 -0
  302. package/lib/generated-proto/pb_schema/lenses/launch_params.js +43 -0
  303. package/lib/generated-proto/pb_schema/lenses/launch_params.js.map +1 -0
  304. package/lib/generated-proto/pb_schema/lenses/launchdata.d.ts +365 -0
  305. package/lib/generated-proto/pb_schema/lenses/launchdata.js +216 -0
  306. package/lib/generated-proto/pb_schema/lenses/launchdata.js.map +1 -0
  307. package/lib/generated-proto/pb_schema/lenses/lures.d.ts +113 -0
  308. package/lib/generated-proto/pb_schema/lenses/lures.js +64 -0
  309. package/lib/generated-proto/pb_schema/lenses/lures.js.map +1 -0
  310. package/lib/generated-proto/pb_schema/lenses/persistent_store.d.ts +29 -0
  311. package/lib/generated-proto/pb_schema/lenses/persistent_store.js +43 -0
  312. package/lib/generated-proto/pb_schema/lenses/persistent_store.js.map +1 -0
  313. package/lib/generated-proto/pb_schema/lenses/snappable.d.ts +921 -0
  314. package/lib/generated-proto/pb_schema/lenses/snappable.js +954 -0
  315. package/lib/generated-proto/pb_schema/lenses/snappable.js.map +1 -0
  316. package/lib/generated-proto/pb_schema/lenses/user_data.d.ts +247 -0
  317. package/lib/generated-proto/pb_schema/lenses/user_data.js +362 -0
  318. package/lib/generated-proto/pb_schema/lenses/user_data.js.map +1 -0
  319. package/lib/handlers/HandlerChainBuilder.d.ts +95 -0
  320. package/lib/handlers/HandlerChainBuilder.js +187 -0
  321. package/lib/handlers/HandlerChainBuilder.js.map +1 -0
  322. package/lib/handlers/arrayBufferParsingHandler.d.ts +10 -0
  323. package/lib/handlers/arrayBufferParsingHandler.js +18 -0
  324. package/lib/handlers/arrayBufferParsingHandler.js.map +1 -0
  325. package/lib/handlers/batchingHandler.d.ts +25 -0
  326. package/lib/handlers/batchingHandler.js +79 -0
  327. package/lib/handlers/batchingHandler.js.map +1 -0
  328. package/lib/handlers/cameraKitServiceFetchHandlerFactory.d.ts +12 -0
  329. package/lib/handlers/cameraKitServiceFetchHandlerFactory.js +19 -0
  330. package/lib/handlers/cameraKitServiceFetchHandlerFactory.js.map +1 -0
  331. package/lib/handlers/debugHandler.d.ts +8 -0
  332. package/lib/handlers/debugHandler.js +27 -0
  333. package/lib/handlers/debugHandler.js.map +1 -0
  334. package/lib/handlers/defaultFetchHandler.d.ts +15 -0
  335. package/lib/handlers/defaultFetchHandler.js +29 -0
  336. package/lib/handlers/defaultFetchHandler.js.map +1 -0
  337. package/lib/handlers/headersModifyingFetchHandler.d.ts +8 -0
  338. package/lib/handlers/headersModifyingFetchHandler.js +13 -0
  339. package/lib/handlers/headersModifyingFetchHandler.js.map +1 -0
  340. package/lib/handlers/index.d.ts +2 -0
  341. package/lib/handlers/index.js +3 -0
  342. package/lib/handlers/index.js.map +1 -0
  343. package/lib/handlers/mappingHandler.d.ts +15 -0
  344. package/lib/handlers/mappingHandler.js +65 -0
  345. package/lib/handlers/mappingHandler.js.map +1 -0
  346. package/lib/handlers/noCorsRetryingFetchHandler.d.ts +48 -0
  347. package/lib/handlers/noCorsRetryingFetchHandler.js +94 -0
  348. package/lib/handlers/noCorsRetryingFetchHandler.js.map +1 -0
  349. package/lib/handlers/persistingHandler.d.ts +14 -0
  350. package/lib/handlers/persistingHandler.js +71 -0
  351. package/lib/handlers/persistingHandler.js.map +1 -0
  352. package/lib/handlers/rateLimitingHandler.d.ts +20 -0
  353. package/lib/handlers/rateLimitingHandler.js +43 -0
  354. package/lib/handlers/rateLimitingHandler.js.map +1 -0
  355. package/lib/handlers/requestStateEmittingHandler.d.ts +29 -0
  356. package/lib/handlers/requestStateEmittingHandler.js +43 -0
  357. package/lib/handlers/requestStateEmittingHandler.js.map +1 -0
  358. package/lib/handlers/responseCachingHandler.d.ts +27 -0
  359. package/lib/handlers/responseCachingHandler.js +94 -0
  360. package/lib/handlers/responseCachingHandler.js.map +1 -0
  361. package/lib/handlers/retryingHandler.d.ts +37 -0
  362. package/lib/handlers/retryingHandler.js +73 -0
  363. package/lib/handlers/retryingHandler.js.map +1 -0
  364. package/lib/handlers/timeoutHandler.d.ts +18 -0
  365. package/lib/handlers/timeoutHandler.js +30 -0
  366. package/lib/handlers/timeoutHandler.js.map +1 -0
  367. package/lib/index.d.ts +33 -0
  368. package/lib/index.js +32 -0
  369. package/lib/index.js.map +1 -0
  370. package/lib/legal/legalPrompt.d.ts +17 -0
  371. package/lib/legal/legalPrompt.js +144 -0
  372. package/lib/legal/legalPrompt.js.map +1 -0
  373. package/lib/legal/legalState.d.ts +50 -0
  374. package/lib/legal/legalState.js +149 -0
  375. package/lib/legal/legalState.js.map +1 -0
  376. package/lib/lens/Lens.d.ts +71 -0
  377. package/lib/lens/Lens.js +63 -0
  378. package/lib/lens/Lens.js.map +1 -0
  379. package/lib/lens/LensLaunchParams.d.ts +19 -0
  380. package/lib/lens/LensLaunchParams.js +38 -0
  381. package/lib/lens/LensLaunchParams.js.map +1 -0
  382. package/lib/lens/LensPersistenceStore.d.ts +7 -0
  383. package/lib/lens/LensPersistenceStore.js +20 -0
  384. package/lib/lens/LensPersistenceStore.js.map +1 -0
  385. package/lib/lens/LensRepository.d.ts +134 -0
  386. package/lib/lens/LensRepository.js +239 -0
  387. package/lib/lens/LensRepository.js.map +1 -0
  388. package/lib/lens/assets/LensAssetRepository.d.ts +66 -0
  389. package/lib/lens/assets/LensAssetRepository.js +179 -0
  390. package/lib/lens/assets/LensAssetRepository.js.map +1 -0
  391. package/lib/lens/assets/LensAssetsProvider.d.ts +21 -0
  392. package/lib/lens/assets/LensAssetsProvider.js +41 -0
  393. package/lib/lens/assets/LensAssetsProvider.js.map +1 -0
  394. package/lib/lens/assets/deviceDependentAssetLoader.d.ts +11 -0
  395. package/lib/lens/assets/deviceDependentAssetLoader.js +58 -0
  396. package/lib/lens/assets/deviceDependentAssetLoader.js.map +1 -0
  397. package/lib/lens/assets/remoteMediaAssetLoaderFactory.d.ts +10 -0
  398. package/lib/lens/assets/remoteMediaAssetLoaderFactory.js +26 -0
  399. package/lib/lens/assets/remoteMediaAssetLoaderFactory.js.map +1 -0
  400. package/lib/lens/assets/staticAssetLoader.d.ts +10 -0
  401. package/lib/lens/assets/staticAssetLoader.js +24 -0
  402. package/lib/lens/assets/staticAssetLoader.js.map +1 -0
  403. package/lib/lens/index.d.ts +7 -0
  404. package/lib/lens/index.js +7 -0
  405. package/lib/lens/index.js.map +1 -0
  406. package/lib/lens/lensEnvelopeUtil.d.ts +5 -0
  407. package/lib/lens/lensEnvelopeUtil.js +19 -0
  408. package/lib/lens/lensEnvelopeUtil.js.map +1 -0
  409. package/lib/lens/lensHttpUtil.d.ts +4 -0
  410. package/lib/lens/lensHttpUtil.js +30 -0
  411. package/lib/lens/lensHttpUtil.js.map +1 -0
  412. package/lib/lens-client-interface/exif.d.ts +20 -0
  413. package/lib/lens-client-interface/exif.js +61 -0
  414. package/lib/lens-client-interface/exif.js.map +1 -0
  415. package/lib/lens-client-interface/imagePicker.d.ts +7 -0
  416. package/lib/lens-client-interface/imagePicker.js +128 -0
  417. package/lib/lens-client-interface/imagePicker.js.map +1 -0
  418. package/lib/lens-client-interface/lensClientInterface.d.ts +13 -0
  419. package/lib/lens-client-interface/lensClientInterface.js +30 -0
  420. package/lib/lens-client-interface/lensClientInterface.js.map +1 -0
  421. package/lib/lens-core-module/generated-types.d.ts +426 -0
  422. package/lib/lens-core-module/generated-types.js +2 -0
  423. package/lib/lens-core-module/generated-types.js.map +1 -0
  424. package/lib/lens-core-module/index.d.ts +2 -0
  425. package/lib/lens-core-module/index.js +3 -0
  426. package/lib/lens-core-module/index.js.map +1 -0
  427. package/lib/lens-core-module/loader/index.d.ts +1 -0
  428. package/lib/lens-core-module/loader/index.js +2 -0
  429. package/lib/lens-core-module/loader/index.js.map +1 -0
  430. package/lib/lens-core-module/loader/lensCoreFactory.d.ts +30 -0
  431. package/lib/lens-core-module/loader/lensCoreFactory.js +121 -0
  432. package/lib/lens-core-module/loader/lensCoreFactory.js.map +1 -0
  433. package/lib/lensCoreWasmVersions.json +5 -0
  434. package/lib/logger/errorLoggingDecorator.d.ts +9 -0
  435. package/lib/logger/errorLoggingDecorator.js +32 -0
  436. package/lib/logger/errorLoggingDecorator.js.map +1 -0
  437. package/lib/logger/logEntries.d.ts +15 -0
  438. package/lib/logger/logEntries.js +14 -0
  439. package/lib/logger/logEntries.js.map +1 -0
  440. package/lib/logger/logger.d.ts +35 -0
  441. package/lib/logger/logger.js +48 -0
  442. package/lib/logger/logger.js.map +1 -0
  443. package/lib/logger/registerLogEntriesSubscriber.d.ts +14 -0
  444. package/lib/logger/registerLogEntriesSubscriber.js +23 -0
  445. package/lib/logger/registerLogEntriesSubscriber.js.map +1 -0
  446. package/lib/media-sources/CameraKitSource.d.ts +88 -0
  447. package/lib/media-sources/CameraKitSource.js +140 -0
  448. package/lib/media-sources/CameraKitSource.js.map +1 -0
  449. package/lib/media-sources/FunctionSource.d.ts +30 -0
  450. package/lib/media-sources/FunctionSource.js +132 -0
  451. package/lib/media-sources/FunctionSource.js.map +1 -0
  452. package/lib/media-sources/ImageSource.d.ts +13 -0
  453. package/lib/media-sources/ImageSource.js +28 -0
  454. package/lib/media-sources/ImageSource.js.map +1 -0
  455. package/lib/media-sources/MediaStreamSource.d.ts +41 -0
  456. package/lib/media-sources/MediaStreamSource.js +146 -0
  457. package/lib/media-sources/MediaStreamSource.js.map +1 -0
  458. package/lib/media-sources/VideoSource.d.ts +21 -0
  459. package/lib/media-sources/VideoSource.js +38 -0
  460. package/lib/media-sources/VideoSource.js.map +1 -0
  461. package/lib/metrics/businessEventsReporter.d.ts +37 -0
  462. package/lib/metrics/businessEventsReporter.js +160 -0
  463. package/lib/metrics/businessEventsReporter.js.map +1 -0
  464. package/lib/metrics/metricsEventTarget.d.ts +41 -0
  465. package/lib/metrics/metricsEventTarget.js +11 -0
  466. package/lib/metrics/metricsEventTarget.js.map +1 -0
  467. package/lib/metrics/metricsHandler.d.ts +9 -0
  468. package/lib/metrics/metricsHandler.js +13 -0
  469. package/lib/metrics/metricsHandler.js.map +1 -0
  470. package/lib/metrics/operationalMetricsReporter.d.ts +52 -0
  471. package/lib/metrics/operationalMetricsReporter.js +108 -0
  472. package/lib/metrics/operationalMetricsReporter.js.map +1 -0
  473. package/lib/metrics/reporters/reportBenchmarks.d.ts +10 -0
  474. package/lib/metrics/reporters/reportBenchmarks.js +29 -0
  475. package/lib/metrics/reporters/reportBenchmarks.js.map +1 -0
  476. package/lib/metrics/reporters/reportGlobalException.d.ts +19 -0
  477. package/lib/metrics/reporters/reportGlobalException.js +68 -0
  478. package/lib/metrics/reporters/reportGlobalException.js.map +1 -0
  479. package/lib/metrics/reporters/reportHttpMetrics.d.ts +17 -0
  480. package/lib/metrics/reporters/reportHttpMetrics.js +92 -0
  481. package/lib/metrics/reporters/reportHttpMetrics.js.map +1 -0
  482. package/lib/metrics/reporters/reportLegalState.d.ts +15 -0
  483. package/lib/metrics/reporters/reportLegalState.js +34 -0
  484. package/lib/metrics/reporters/reportLegalState.js.map +1 -0
  485. package/lib/metrics/reporters/reportLensAndAssetDownload.d.ts +38 -0
  486. package/lib/metrics/reporters/reportLensAndAssetDownload.js +88 -0
  487. package/lib/metrics/reporters/reportLensAndAssetDownload.js.map +1 -0
  488. package/lib/metrics/reporters/reportLensValidationFailed.d.ts +20 -0
  489. package/lib/metrics/reporters/reportLensValidationFailed.js +24 -0
  490. package/lib/metrics/reporters/reportLensValidationFailed.js.map +1 -0
  491. package/lib/metrics/reporters/reportLensView.d.ts +36 -0
  492. package/lib/metrics/reporters/reportLensView.js +101 -0
  493. package/lib/metrics/reporters/reportLensView.js.map +1 -0
  494. package/lib/metrics/reporters/reportLensWait.d.ts +33 -0
  495. package/lib/metrics/reporters/reportLensWait.js +56 -0
  496. package/lib/metrics/reporters/reportLensWait.js.map +1 -0
  497. package/lib/metrics/reporters/reportSessionException.d.ts +17 -0
  498. package/lib/metrics/reporters/reportSessionException.js +12 -0
  499. package/lib/metrics/reporters/reportSessionException.js.map +1 -0
  500. package/lib/metrics/reporters/reportUserSession.d.ts +14 -0
  501. package/lib/metrics/reporters/reportUserSession.js +67 -0
  502. package/lib/metrics/reporters/reportUserSession.js.map +1 -0
  503. package/lib/metrics/reporters/reporters.d.ts +44 -0
  504. package/lib/metrics/reporters/reporters.js +33 -0
  505. package/lib/metrics/reporters/reporters.js.map +1 -0
  506. package/lib/namedErrors.d.ts +107 -0
  507. package/lib/namedErrors.js +56 -0
  508. package/lib/namedErrors.js.map +1 -0
  509. package/lib/persistence/ExpiringPersistence.d.ts +20 -0
  510. package/lib/persistence/ExpiringPersistence.js +58 -0
  511. package/lib/persistence/ExpiringPersistence.js.map +1 -0
  512. package/lib/persistence/IndexedDBPersistence.d.ts +47 -0
  513. package/lib/persistence/IndexedDBPersistence.js +180 -0
  514. package/lib/persistence/IndexedDBPersistence.js.map +1 -0
  515. package/lib/persistence/Persistence.d.ts +25 -0
  516. package/lib/persistence/Persistence.js +10 -0
  517. package/lib/persistence/Persistence.js.map +1 -0
  518. package/lib/remote-configuration/cofHandler.d.ts +21 -0
  519. package/lib/remote-configuration/cofHandler.js +75 -0
  520. package/lib/remote-configuration/cofHandler.js.map +1 -0
  521. package/lib/remote-configuration/remoteConfiguration.d.ts +13 -0
  522. package/lib/remote-configuration/remoteConfiguration.js +43 -0
  523. package/lib/remote-configuration/remoteConfiguration.js.map +1 -0
  524. package/lib/session/CameraKitSession.d.ts +252 -0
  525. package/lib/session/CameraKitSession.js +439 -0
  526. package/lib/session/CameraKitSession.js.map +1 -0
  527. package/lib/session/CameraKitSessionEvents.d.ts +33 -0
  528. package/lib/session/CameraKitSessionEvents.js +21 -0
  529. package/lib/session/CameraKitSessionEvents.js.map +1 -0
  530. package/lib/session/LensKeyboard.d.ts +89 -0
  531. package/lib/session/LensKeyboard.js +95 -0
  532. package/lib/session/LensKeyboard.js.map +1 -0
  533. package/lib/session/LensPerformanceMeasurement.d.ts +55 -0
  534. package/lib/session/LensPerformanceMeasurement.js +91 -0
  535. package/lib/session/LensPerformanceMeasurement.js.map +1 -0
  536. package/lib/session/LensPerformanceMetrics.d.ts +31 -0
  537. package/lib/session/LensPerformanceMetrics.js +58 -0
  538. package/lib/session/LensPerformanceMetrics.js.map +1 -0
  539. package/lib/session/index.d.ts +1 -0
  540. package/lib/session/index.js +2 -0
  541. package/lib/session/index.js.map +1 -0
  542. package/lib/session/lensState.d.ts +29 -0
  543. package/lib/session/lensState.js +160 -0
  544. package/lib/session/lensState.js.map +1 -0
  545. package/lib/session/sessionState.d.ts +10 -0
  546. package/lib/session/sessionState.js +12 -0
  547. package/lib/session/sessionState.js.map +1 -0
  548. package/lib/transforms/Transform2D.d.ts +17 -0
  549. package/lib/transforms/Transform2D.js +18 -0
  550. package/lib/transforms/Transform2D.js.map +1 -0
  551. package/lib/transforms/index.d.ts +1 -0
  552. package/lib/transforms/index.js +2 -0
  553. package/lib/transforms/index.js.map +1 -0
  554. package/package.json +62 -0
@@ -0,0 +1,208 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CameraKit Web SDK - v0.7.0-alpha.1</title><meta name="description" content="Documentation for CameraKit Web SDK - v0.7.0-alpha.1"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2
+ <div class="tsd-toolbar-contents container">
3
+ <div class="table-cell" id="tsd-search" data-base=".">
4
+ <div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
5
+ <ul class="results">
6
+ <li class="state loading">Preparing search index...</li>
7
+ <li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">CameraKit Web SDK - v0.7.0-alpha.1</a></div>
8
+ <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
9
+ <div class="container container-main">
10
+ <div class="col-8 col-content">
11
+ <div class="tsd-page-title">
12
+ <h2>CameraKit Web SDK - v0.7.0-alpha.1</h2></div>
13
+ <div class="tsd-panel tsd-typography">
14
+ <a href="#snap-camera-kit-web-sdk" id="snap-camera-kit-web-sdk" style="color: inherit; text-decoration: none;">
15
+ <h1>Snap Camera Kit Web SDK</h1>
16
+ </a>
17
+ <p>The Camera Kit Web SDK allows web developers to build Snap&#39;s core AR Lens technology into their applications.</p>
18
+
19
+ <a href="#getting-started" id="getting-started" style="color: inherit; text-decoration: none;">
20
+ <h2>Getting started</h2>
21
+ </a>
22
+ <p>First, familiarize yourself with the <a href="https://docs.snap.com/camera-kit/home">Camera Kit docs</a>. This covers access to the Camera Kit Portal, where to find your API Token, how to manage lenses and lens groups, etc.</p>
23
+ <p>Most of the content found here can also be found on the <a href="https://docs.snap.com/camera-kit/quick-start/integrate-sdk/integrate-sdk-web/web-configuration">Camera Kit docs</a> site.</p>
24
+
25
+ <a href="#installing-the-sdk" id="installing-the-sdk" style="color: inherit; text-decoration: none;">
26
+ <h3>Installing the SDK</h3>
27
+ </a>
28
+ <pre><code><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-0">install</span><span class="hl-1"> @</span><span class="hl-0">snap</span><span class="hl-1">/</span><span class="hl-0">camera</span><span class="hl-1">-</span><span class="hl-0">kit</span>
29
+ </code></pre>
30
+
31
+ <a href="#using-the-sdk-in-a-javascript-project" id="using-the-sdk-in-a-javascript-project" style="color: inherit; text-decoration: none;">
32
+ <h3>Using the SDK in a Javascript project</h3>
33
+ </a>
34
+ <p>The SDK is authored in TypeScript, and distributes type definitions. All the examples here are presented in TypeScript. We encourage the use of TypeScript in projects that consume the SDK – but it&#39;s also fully compatible with Javascript projects as well.</p>
35
+
36
+ <a href="#importing-the-sdk" id="importing-the-sdk" style="color: inherit; text-decoration: none;">
37
+ <h3>Importing the SDK</h3>
38
+ </a>
39
+ <p>Currently, the SDK distributes <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules">Javascript modules</a>. We may support other module formats in the future (e.g. CommonJS), but for now you&#39;ll need to use <code>import</code> syntax to use the Camera Kit Web SDK.</p>
40
+ <p>If you&#39;re working in a project that uses a bundler (e.g. Webpack or Rollup), or builds using the TypeScript compiler, this shouldn&#39;t be an issue. If you&#39;re not using a bundler, many browsers now support <code>import</code> syntax natively – if you don&#39;t need support for older browsers (or IE), no bundler is necessary.</p>
41
+
42
+ <a href="#bootstrapping-the-sdk" id="bootstrapping-the-sdk" style="color: inherit; text-decoration: none;">
43
+ <h3>Bootstrapping the SDK</h3>
44
+ </a>
45
+ <p>With the SDK installed and capable of being imported, the first thing to do is bootstrap the SDK. This tells the SDK to download the LensCore WebAssembly runtime, which will be used to render Lenses. It also allows you to configure the SDK according to your needs.</p>
46
+ <p>To call <a href="functions/bootstrapCameraKit.html">bootstrapCameraKit</a>, you&#39;ll need to provide a <code>apiToken</code>. Once you&#39;ve completed the <a href="https://docs.snap.com/camera-kit/guides/quick-start/integrate-sdk/setting-up-accounts">Getting set up in our portals</a> section of the Getting Started guide, you&#39;ll be able to find this in the <a href="https://devportal.snap.com/manage">Snap Kit Portal</a>.</p>
47
+ <pre><code class="language-ts"><span class="hl-2">import</span><span class="hl-1"> { </span><span class="hl-0">boostrapCameraKit</span><span class="hl-1"> } </span><span class="hl-2">from</span><span class="hl-1"> </span><span class="hl-3">&quot;@snap/camera-kit&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-1">(</span><span class="hl-4">async</span><span class="hl-1"> </span><span class="hl-4">function</span><span class="hl-1"> </span><span class="hl-5">main</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">apiToken</span><span class="hl-1"> = </span><span class="hl-3">&quot;API Token value copied from the Camera Kit Portal&quot;</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">cameraKit</span><span class="hl-1"> = </span><span class="hl-2">await</span><span class="hl-1"> </span><span class="hl-5">bootstrapCameraKit</span><span class="hl-1">({ </span><span class="hl-0">apiToken</span><span class="hl-1"> });</span><br/><span class="hl-1">})();</span>
48
+ </code></pre>
49
+
50
+ <a href="#creating-a-camerakitsession" id="creating-a-camerakitsession" style="color: inherit; text-decoration: none;">
51
+ <h3>Creating a CameraKitSession</h3>
52
+ </a>
53
+ <p>In order to render Lenses, you must first create a <a href="classes/CameraKitSession.html">CameraKitSession</a>. Each session represents a rendering pipeline - it connects an input media source (e.g. a webcam) to the LensCore AR engine, applies a Lens, and renders the output to a <code>&lt;canvas&gt;</code> element.</p>
54
+ <p>There are two ways to create a session. If you already have a <code>&lt;canvas&gt;</code> element on your page that you&#39;d like for the <a href="classes/CameraKitSession.html">CameraKitSession</a> to render into, you can pass it to Camera Kit when creating the session. Otherwise, the session will create a new <code>&lt;canvas&gt;</code> element which you can add to the DOM.</p>
55
+ <pre><code class="language-ts"><span class="hl-7">// Using an existing canvas</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">canvas</span><span class="hl-1"> = </span><span class="hl-0">document</span><span class="hl-1">.</span><span class="hl-5">getElementById</span><span class="hl-1">(</span><span class="hl-3">&quot;my-canvas&quot;</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">session</span><span class="hl-1"> = </span><span class="hl-2">await</span><span class="hl-1"> </span><span class="hl-0">cameraKit</span><span class="hl-1">.</span><span class="hl-5">createSession</span><span class="hl-1">(</span><span class="hl-0">canvas</span><span class="hl-1">);</span><br/><br/><span class="hl-7">// Let Camera Kit create a new canvas, then append it to the DOM</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">canvasContainer</span><span class="hl-1"> = </span><span class="hl-0">document</span><span class="hl-1">.</span><span class="hl-5">getElementById</span><span class="hl-1">(</span><span class="hl-3">&quot;canvas-container&quot;</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">session</span><span class="hl-1"> = </span><span class="hl-2">await</span><span class="hl-1"> </span><span class="hl-0">cameraKit</span><span class="hl-1">.</span><span class="hl-5">createSession</span><span class="hl-1">();</span><br/><span class="hl-0">canvasContainer</span><span class="hl-1">.</span><span class="hl-5">appendChild</span><span class="hl-1">(</span><span class="hl-0">session</span><span class="hl-1">.</span><span class="hl-0">output</span><span class="hl-1">.</span><span class="hl-0">live</span><span class="hl-1">);</span>
56
+ </code></pre>
57
+ <p><em>There are actually two different output canvases: <code>live</code> and <code>capture</code>. These correspond to the two different RenderTargets to which a Lens may render. The <code>live</code> output renders a view suitable for presentation to the current user. Some Lenses may also render to the <code>capture</code> output, which renders content suitable for viewing by other users.</em></p>
58
+
59
+ <a href="#obtaining-a-media-source" id="obtaining-a-media-source" style="color: inherit; text-decoration: none;">
60
+ <h3>Obtaining a media source</h3>
61
+ </a>
62
+ <p>The most common source will be the user&#39;s webcam. Camera Kit Web SDK provides helper methods to create a <a href="classes/CameraKitSource.html">CameraKitSource</a> object from
63
+ a <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaStream/MediaStream"><code>MediaStream</code></a>, or directly from a user&#39;s webcam via <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia"><code>getUserMedia</code></a>.</p>
64
+ <pre><code class="language-ts"><span class="hl-2">import</span><span class="hl-1"> { </span><span class="hl-0">createUserMediaSource</span><span class="hl-1"> } </span><span class="hl-2">from</span><span class="hl-1"> </span><span class="hl-3">&#39;@snap/camera-kit&#39;</span><br/><br/><span class="hl-7">// ...</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">source</span><span class="hl-1"> = </span><span class="hl-2">await</span><span class="hl-1"> </span><span class="hl-5">createUserMediaSource</span><span class="hl-1">({ </span><span class="hl-0">video:</span><span class="hl-1"> </span><span class="hl-4">true</span><span class="hl-1"> });</span><br/><span class="hl-0">session</span><span class="hl-1">.</span><span class="hl-5">setSource</span><span class="hl-1">(</span><span class="hl-0">source</span><span class="hl-1">);</span>
65
+ </code></pre>
66
+ <p><em>Note that calling <code>createUserMediaSource</code> will prompt the user to grant the webpage access to the webcam.</em></p>
67
+
68
+ <a href="#applying-a-lens" id="applying-a-lens" style="color: inherit; text-decoration: none;">
69
+ <h3>Applying a Lens</h3>
70
+ </a>
71
+ <p>In order to apply a lens to our session, we first have to fetch metadata for the lens we wish to apply. We can configure a group of lenses and get all the lenses in that group – this could be useful if we want to allow the user to select a lens from the group. Or if we know the specific lens we want to apply, we can provide its unique ID (along with the ID of a group that contains that lens) and get back just the single lens.</p>
72
+ <p>In the <a href="https://camera-kit.snapchat.com/">Camera Kit Portal</a>, you can find available lenses and add them to lens groups. Once you&#39;ve chosen a lens or lens group to load, you can use the Lens repository to fetch the lens metadata. Then you can apply the lens to the session.</p>
73
+ <p><em>The <a href="https://docs.snap.com/camera-kit/guides/quick-start/build-manage-ar-content/camera-kit-portal">Camera Kit docs</a> include info on how to set up Lenses and Lens Groups.</em></p>
74
+ <pre><code class="language-ts"><span class="hl-7">// A single lens</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">lens</span><span class="hl-1"> = </span><span class="hl-2">await</span><span class="hl-1"> </span><span class="hl-0">cameraKit</span><span class="hl-1">.</span><span class="hl-0">lensRepository</span><span class="hl-1">.</span><span class="hl-5">loadLens</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-3">&quot;A lens ID found in the Camera Kit Portal&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">&quot;A lens group ID&quot;</span><span class="hl-1">,</span><br/><span class="hl-1">);</span><br/><span class="hl-0">session</span><span class="hl-1">.</span><span class="hl-5">applyLens</span><span class="hl-1">(</span><span class="hl-0">lens</span><span class="hl-1">);</span><br/><br/><span class="hl-7">// One or more lens groups – lenses from all groups are returned as a single array of lenses.</span><br/><span class="hl-4">const</span><span class="hl-1"> { </span><span class="hl-6">lenses</span><span class="hl-1"> } = </span><span class="hl-2">await</span><span class="hl-1"> </span><span class="hl-0">cameraKit</span><span class="hl-1">.</span><span class="hl-0">lensRepository</span><span class="hl-1">.</span><span class="hl-5">loadLensGroups</span><span class="hl-1">([</span><br/><span class="hl-1"> </span><span class="hl-3">&quot;A lens group ID&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">&quot;These can be found in the Camera Kit Portal&quot;</span><span class="hl-1">,</span><br/><span class="hl-1">]);</span><br/><span class="hl-0">session</span><span class="hl-1">.</span><span class="hl-5">applyLens</span><span class="hl-1">(</span><span class="hl-0">lenses</span><span class="hl-1">[</span><span class="hl-8">0</span><span class="hl-1">]);</span>
75
+ </code></pre>
76
+
77
+ <a href="#setting-the-render-size" id="setting-the-render-size" style="color: inherit; text-decoration: none;">
78
+ <h3>Setting the render size</h3>
79
+ </a>
80
+ <p>By default, Camera Kit will render its output at the same resolution as the video input you provided. But you can also tell Camera Kit to render at a different resolution.</p>
81
+ <p>Keep in mind that this controls LensCore&#39;s render resolution, and not (necessarily) the size at which the output canvas is displayed to the user. The output canvas may be sized using HTML and CSS, and may apply its own scaling to the rendered output.</p>
82
+ <p>Most of the time you&#39;ll not need to set the render size – but it could be useful if your video source is, say, very high resolution. In that case, you may observe better performance by telling Camera Kit to render at a lower resolution.</p>
83
+ <pre><code class="language-ts"><span class="hl-0">session</span><span class="hl-1">.</span><span class="hl-5">setRenderSize</span><span class="hl-1">(</span><span class="hl-0">width</span><span class="hl-1">, </span><span class="hl-0">height</span><span class="hl-1">);</span>
84
+ </code></pre>
85
+ <p><em>Note that if using <a href="functions/createUserMediaSource.html">createUserMediaSource</a>, best performance can be achieved by requesting the resolution you want to display. This can be done using <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#parameters">constraints</a></em></p>
86
+
87
+ <a href="#session-playback" id="session-playback" style="color: inherit; text-decoration: none;">
88
+ <h3>Session playback</h3>
89
+ </a>
90
+ <p>The <a href="classes/CameraKitSession.html">CameraKitSession</a> will only process input video frames and render them to the output when you tell it to do so – this way, you can control when Camera Kit is using a client&#39;s resources (e.g. CPU and GPU compute cycles). You can tell the session to <code>play</code> or <code>pause</code>.</p>
91
+ <pre><code class="language-ts"><span class="hl-0">session</span><span class="hl-1">.</span><span class="hl-5">play</span><span class="hl-1">();</span><br/><br/><span class="hl-7">// ...sometime later</span><br/><span class="hl-0">session</span><span class="hl-1">.</span><span class="hl-5">pause</span><span class="hl-1">();</span>
92
+ </code></pre>
93
+ <p><em>You can also tell the session which output – <code>live</code> or <code>capture</code> - to play / pause. By default, <code>play</code> will start rendering the <code>live</code> output and <code>pause</code> will pause rendering all outputs.</em></p>
94
+
95
+ <a href="#putting-it-all-together" id="putting-it-all-together" style="color: inherit; text-decoration: none;">
96
+ <h3>Putting it all together</h3>
97
+ </a>
98
+ <p>Using the examples above, here&#39;s a complete example of the minimal Camera Kit Web SDK integration:</p>
99
+ <pre><code class="language-ts"><span class="hl-2">import</span><span class="hl-1"> { </span><span class="hl-0">boostrapCameraKit</span><span class="hl-1">, </span><span class="hl-0">createUserMediaSource</span><span class="hl-1"> } </span><span class="hl-2">from</span><span class="hl-1"> </span><span class="hl-3">&quot;@snap/camera-kit&quot;</span><span class="hl-1">;</span><br/><br/><span class="hl-1">(</span><span class="hl-4">async</span><span class="hl-1"> </span><span class="hl-4">function</span><span class="hl-1"> </span><span class="hl-5">main</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">apiToken</span><span class="hl-1"> = </span><span class="hl-3">&quot;API Token value copied from the SnapKit developer portal&quot;</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">cameraKit</span><span class="hl-1"> = </span><span class="hl-2">await</span><span class="hl-1"> </span><span class="hl-5">bootstrapCameraKit</span><span class="hl-1">({ </span><span class="hl-0">apiToken</span><span class="hl-1"> });</span><br/><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">canvas</span><span class="hl-1"> = </span><span class="hl-0">document</span><span class="hl-1">.</span><span class="hl-5">getElementById</span><span class="hl-1">(</span><span class="hl-3">&quot;my-canvas&quot;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">session</span><span class="hl-1"> = </span><span class="hl-2">await</span><span class="hl-1"> </span><span class="hl-0">cameraKit</span><span class="hl-1">.</span><span class="hl-5">createSession</span><span class="hl-1">(</span><span class="hl-0">canvas</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">source</span><span class="hl-1"> = </span><span class="hl-2">await</span><span class="hl-1"> </span><span class="hl-5">createUserMediaSource</span><span class="hl-1">({ </span><span class="hl-0">video:</span><span class="hl-1"> </span><span class="hl-4">true</span><span class="hl-1"> });</span><br/><span class="hl-1"> </span><span class="hl-0">session</span><span class="hl-1">.</span><span class="hl-5">setSource</span><span class="hl-1">(</span><span class="hl-0">source</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">lens</span><span class="hl-1"> = </span><span class="hl-2">await</span><span class="hl-1"> </span><span class="hl-0">cameraKit</span><span class="hl-1">.</span><span class="hl-0">lensRepository</span><span class="hl-1">.</span><span class="hl-5">loadLens</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-3">&quot;A lens ID found in the Camera Kit Portal&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">&quot;A lens group ID&quot;</span><span class="hl-1">,</span><br/><span class="hl-1"> );</span><br/><span class="hl-1"> </span><span class="hl-2">await</span><span class="hl-1"> </span><span class="hl-0">session</span><span class="hl-1">.</span><span class="hl-5">applyLens</span><span class="hl-1">(</span><span class="hl-0">lens</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-2">await</span><span class="hl-1"> </span><span class="hl-0">session</span><span class="hl-1">.</span><span class="hl-5">play</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-0">console</span><span class="hl-1">.</span><span class="hl-5">log</span><span class="hl-1">(</span><span class="hl-3">&quot;Lens rendering has started!&quot;</span><span class="hl-1">);</span><br/><span class="hl-1">})();</span>
100
+ </code></pre>
101
+
102
+ <a href="#content-security-policy" id="content-security-policy" style="color: inherit; text-decoration: none;">
103
+ <h3>Content Security Policy</h3>
104
+ </a>
105
+ <p>Camera Kit Web SDK downloads an executable WebAssembly file containing the Lens rendering engine. This file is served from an optimized CDN. If you have a <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy">Content Security Policy</a> in place on your page, you&#39;ll likely need to make some changes in order for Camera Kit to work.</p>
106
+
107
+ <a href="#connect-src" id="connect-src" style="color: inherit; text-decoration: none;">
108
+ <h4><code>connect-src</code></h4>
109
+ </a>
110
+ <p>Must include <code>https://*.snapchat.com</code>, otherwise Camera Kit Web will fail to initialize.</p>
111
+
112
+ <a href="#script-src" id="script-src" style="color: inherit; text-decoration: none;">
113
+ <h4><code>script-src</code></h4>
114
+ </a>
115
+ <p>Must include <code>https://cf-st.sc-cdn.net/ blob: &#39;wasm-unsafe-eval&#39;</code>.</p>
116
+ <p><em>Note: Some older browser versions may not support the <code>&#39;wasm-unsafe-eval&#39;</code> source value, and it may be necessary to use <code>&#39;unsafe-eval&#39;</code> to allow Camera Kit&#39;s downloaded WebAssembly to run.</em></p>
117
+ </div></div>
118
+ <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
119
+ <div class="tsd-navigation settings">
120
+ <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
121
+ <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
122
+ <div class="tsd-accordion-details">
123
+ <div class="tsd-filter-visibility">
124
+ <h4 class="uppercase">Member Visibility</h4><form>
125
+ <ul id="tsd-filter-options">
126
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
127
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></form></div>
128
+ <div class="tsd-theme-toggle">
129
+ <h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
130
+ <nav class="tsd-navigation primary">
131
+ <details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
132
+ <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
133
+ <div class="tsd-accordion-details">
134
+ <ul>
135
+ <li class="current selected"><a href="modules.html">Camera<wbr/>Kit <wbr/>Web SDK -<wbr/> v0.7.0-<wbr/>alpha.1</a>
136
+ <ul></ul></li></ul></div></details></nav>
137
+ <nav class="tsd-navigation secondary menu-sticky">
138
+ <ul>
139
+ <li class="tsd-kind-class"><a href="classes/CameraKit.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg>Camera<wbr/>Kit</a></li>
140
+ <li class="tsd-kind-class"><a href="classes/TypedCustomEvent.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Typed<wbr/>Custom<wbr/>Event</a></li>
141
+ <li class="tsd-kind-class"><a href="classes/TypedEventTarget.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Typed<wbr/>Event<wbr/>Target</a></li>
142
+ <li class="tsd-kind-class"><a href="classes/LensSources.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Lens<wbr/>Sources</a></li>
143
+ <li class="tsd-kind-class"><a href="classes/LensRepository.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Lens<wbr/>Repository</a></li>
144
+ <li class="tsd-kind-class"><a href="classes/CameraKitSource.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Camera<wbr/>Kit<wbr/>Source</a></li>
145
+ <li class="tsd-kind-class"><a href="classes/CameraKitSession.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Camera<wbr/>Kit<wbr/>Session</a></li>
146
+ <li class="tsd-kind-class"><a href="classes/LensPerformanceMeasurement.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Lens<wbr/>Performance<wbr/>Measurement</a></li>
147
+ <li class="tsd-kind-class"><a href="classes/LensPerformanceMetrics.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Lens<wbr/>Performance<wbr/>Metrics</a></li>
148
+ <li class="tsd-kind-class"><a href="classes/Transform2D.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Transform2D</a></li>
149
+ <li class="tsd-kind-interface"><a href="interfaces/CreateSessionOptions.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg>Create<wbr/>Session<wbr/>Options</a></li>
150
+ <li class="tsd-kind-interface"><a href="interfaces/EstimatedLensPerformance.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>Estimated<wbr/>Lens<wbr/>Performance</a></li>
151
+ <li class="tsd-kind-interface"><a href="interfaces/CameraKitBootstrapConfiguration.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>Camera<wbr/>Kit<wbr/>Bootstrap<wbr/>Configuration</a></li>
152
+ <li class="tsd-kind-interface"><a href="interfaces/LensSource.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>Lens<wbr/>Source</a></li>
153
+ <li class="tsd-kind-interface"><a href="interfaces/UriHandler.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>Uri<wbr/>Handler</a></li>
154
+ <li class="tsd-kind-interface"><a href="interfaces/UriRequest.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>Uri<wbr/>Request</a></li>
155
+ <li class="tsd-kind-interface"><a href="interfaces/UriResponse.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>Uri<wbr/>Response</a></li>
156
+ <li class="tsd-kind-interface"><a href="interfaces/UriCancelRequest.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>Uri<wbr/>Cancel<wbr/>Request</a></li>
157
+ <li class="tsd-kind-interface"><a href="interfaces/Lens.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>Lens</a></li>
158
+ <li class="tsd-kind-interface"><a href="interfaces/CameraKitSourceSubscriber.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>Camera<wbr/>Kit<wbr/>Source<wbr/>Subscriber</a></li>
159
+ <li class="tsd-kind-interface"><a href="interfaces/MediaStreamSourceOptions.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>Media<wbr/>Stream<wbr/>Source<wbr/>Options</a></li>
160
+ <li class="tsd-kind-interface"><a href="interfaces/VideoSourceOptions.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>Video<wbr/>Source<wbr/>Options</a></li>
161
+ <li class="tsd-kind-interface"><a href="interfaces/ComputedFrameMetrics.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>Computed<wbr/>Frame<wbr/>Metrics</a></li>
162
+ <li class="tsd-kind-type-alias"><a href="types/LensMetricsEvents.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg>Lens<wbr/>Metrics<wbr/>Events</a></li>
163
+ <li class="tsd-kind-type-alias"><a href="types/LensPerformanceCluster.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Lens<wbr/>Performance<wbr/>Cluster</a></li>
164
+ <li class="tsd-kind-type-alias"><a href="types/PublicContainer.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Public<wbr/>Container</a></li>
165
+ <li class="tsd-kind-type-alias"><a href="types/UriHandlers.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Uri<wbr/>Handlers</a></li>
166
+ <li class="tsd-kind-type-alias"><a href="types/Uri.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Uri</a></li>
167
+ <li class="tsd-kind-type-alias"><a href="types/LensLaunchParams.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Lens<wbr/>Launch<wbr/>Params</a></li>
168
+ <li class="tsd-kind-type-alias"><a href="types/AssetTiming.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Asset<wbr/>Timing</a></li>
169
+ <li class="tsd-kind-type-alias"><a href="types/AssetLoader.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Asset<wbr/>Loader</a></li>
170
+ <li class="tsd-kind-type-alias"><a href="types/CameraKitDeviceInfo.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Camera<wbr/>Kit<wbr/>Device<wbr/>Info</a></li>
171
+ <li class="tsd-kind-type-alias"><a href="types/CameraKitSourceInfo.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Camera<wbr/>Kit<wbr/>Source<wbr/>Info</a></li>
172
+ <li class="tsd-kind-type-alias"><a href="types/CameraKitSourceOptions.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Camera<wbr/>Kit<wbr/>Source<wbr/>Options</a></li>
173
+ <li class="tsd-kind-type-alias"><a href="types/LensView.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Lens<wbr/>View</a></li>
174
+ <li class="tsd-kind-type-alias"><a href="types/LensWait.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Lens<wbr/>Wait</a></li>
175
+ <li class="tsd-kind-type-alias"><a href="types/LegalError.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Legal<wbr/>Error</a></li>
176
+ <li class="tsd-kind-type-alias"><a href="types/LensContentValidationError.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Lens<wbr/>Content<wbr/>Validation<wbr/>Error</a></li>
177
+ <li class="tsd-kind-type-alias"><a href="types/LensError.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Lens<wbr/>Error</a></li>
178
+ <li class="tsd-kind-type-alias"><a href="types/CameraKitSourceError.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Camera<wbr/>Kit<wbr/>Source<wbr/>Error</a></li>
179
+ <li class="tsd-kind-type-alias"><a href="types/LensImagePickerError.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Lens<wbr/>Image<wbr/>Picker<wbr/>Error</a></li>
180
+ <li class="tsd-kind-type-alias"><a href="types/CacheKeyNotFoundError.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Cache<wbr/>Key<wbr/>Not<wbr/>Found<wbr/>Error</a></li>
181
+ <li class="tsd-kind-type-alias"><a href="types/ConfigurationError.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Configuration<wbr/>Error</a></li>
182
+ <li class="tsd-kind-type-alias"><a href="types/WebGLError.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>WebGLError</a></li>
183
+ <li class="tsd-kind-type-alias"><a href="types/BenchmarkError.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Benchmark<wbr/>Error</a></li>
184
+ <li class="tsd-kind-type-alias"><a href="types/PlatformNotSupportedError.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Platform<wbr/>Not<wbr/>Supported<wbr/>Error</a></li>
185
+ <li class="tsd-kind-type-alias"><a href="types/LensExecutionError.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Lens<wbr/>Execution<wbr/>Error</a></li>
186
+ <li class="tsd-kind-type-alias"><a href="types/PersistentStoreError.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Persistent<wbr/>Store<wbr/>Error</a></li>
187
+ <li class="tsd-kind-type-alias"><a href="types/LensAssetError.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Lens<wbr/>Asset<wbr/>Error</a></li>
188
+ <li class="tsd-kind-type-alias"><a href="types/BootstrapError.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Bootstrap<wbr/>Error</a></li>
189
+ <li class="tsd-kind-type-alias"><a href="types/RenderTarget.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Render<wbr/>Target</a></li>
190
+ <li class="tsd-kind-type-alias"><a href="types/CameraKitSessionEvents.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Camera<wbr/>Kit<wbr/>Session<wbr/>Events</a></li>
191
+ <li class="tsd-kind-type-alias"><a href="types/CameraKitSessionEventListener.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Camera<wbr/>Kit<wbr/>Session<wbr/>Event<wbr/>Listener</a></li>
192
+ <li class="tsd-kind-type-alias"><a href="types/KeyboardEvents.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Keyboard<wbr/>Events</a></li>
193
+ <li class="tsd-kind-type-alias"><a href="types/Keyboard.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Keyboard</a></li>
194
+ <li class="tsd-kind-variable"><a href="variables/extensionRequestContext.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-32-path"></rect><path d="M11.106 16L8.85 7.24H9.966L11.454 13.192C11.558 13.608 11.646 13.996 11.718 14.356C11.79 14.708 11.842 14.976 11.874 15.16C11.906 14.976 11.954 14.708 12.018 14.356C12.09 13.996 12.178 13.608 12.282 13.192L13.758 7.24H14.85L12.582 16H11.106Z" fill="var(--color-text)" id="icon-32-text"></path></svg>extension<wbr/>Request<wbr/>Context</a></li>
195
+ <li class="tsd-kind-function"><a href="functions/estimateLensPerformance.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg>estimate<wbr/>Lens<wbr/>Performance</a></li>
196
+ <li class="tsd-kind-function"><a href="functions/bootstrapCameraKit.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>bootstrap<wbr/>Camera<wbr/>Kit</a></li>
197
+ <li class="tsd-kind-function"><a href="functions/createExtension.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>create<wbr/>Extension</a></li>
198
+ <li class="tsd-kind-function"><a href="functions/Injectable.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>Injectable</a></li>
199
+ <li class="tsd-kind-function"><a href="functions/lensSourcesFactory.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>lens<wbr/>Sources<wbr/>Factory</a></li>
200
+ <li class="tsd-kind-function"><a href="functions/uriHandlersFactory.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>uri<wbr/>Handlers<wbr/>Factory</a></li>
201
+ <li class="tsd-kind-function"><a href="functions/getRequiredBootstrapURLs.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>get<wbr/>Required<wbr/>BootstrapURLs</a></li>
202
+ <li class="tsd-kind-function"><a href="functions/createImageSource.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>create<wbr/>Image<wbr/>Source</a></li>
203
+ <li class="tsd-kind-function"><a href="functions/createUserMediaSource.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>create<wbr/>User<wbr/>Media<wbr/>Source</a></li>
204
+ <li class="tsd-kind-function"><a href="functions/createMediaStreamSource.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>create<wbr/>Media<wbr/>Stream<wbr/>Source</a></li>
205
+ <li class="tsd-kind-function"><a href="functions/createVideoSource.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>create<wbr/>Video<wbr/>Source</a></li></ul></nav></div></div>
206
+ <div class="container tsd-generator">
207
+ <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
208
+ <div class="overlay"></div><script src="assets/main.js"></script></body></html>
@@ -0,0 +1,132 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CameraKitBootstrapConfiguration | CameraKit Web SDK - v0.7.0-alpha.1</title><meta name="description" content="Documentation for CameraKit Web SDK - v0.7.0-alpha.1"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2
+ <div class="tsd-toolbar-contents container">
3
+ <div class="table-cell" id="tsd-search" data-base="..">
4
+ <div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
5
+ <ul class="results">
6
+ <li class="state loading">Preparing search index...</li>
7
+ <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">CameraKit Web SDK - v0.7.0-alpha.1</a></div>
8
+ <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
9
+ <div class="container container-main">
10
+ <div class="col-8 col-content">
11
+ <div class="tsd-page-title">
12
+ <ul class="tsd-breadcrumb">
13
+ <li><a href="../modules.html">CameraKit Web SDK - v0.7.0-alpha.1</a></li>
14
+ <li><a href="CameraKitBootstrapConfiguration.html">CameraKitBootstrapConfiguration</a></li></ul>
15
+ <h1>Interface CameraKitBootstrapConfiguration</h1></div>
16
+ <section class="tsd-panel tsd-comment">
17
+ <div class="tsd-comment tsd-typography"><p>Configuration which must be provided when calling <a href="../functions/bootstrapCameraKit.html">bootstrapCameraKit</a>. These values are used to create various
18
+ CameraKit components.</p>
19
+ </div></section>
20
+ <section class="tsd-panel tsd-hierarchy">
21
+ <h4>Hierarchy</h4>
22
+ <ul class="tsd-hierarchy">
23
+ <li><span class="target">CameraKitBootstrapConfiguration</span></li></ul></section>
24
+ <section class="tsd-panel-group tsd-index-group">
25
+ <section class="tsd-panel tsd-index-panel">
26
+ <details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
27
+ <h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
28
+ <div class="tsd-accordion-details">
29
+ <section class="tsd-index-section">
30
+ <h3 class="tsd-index-heading">Properties</h3>
31
+ <div class="tsd-index-list"><a href="CameraKitBootstrapConfiguration.html#apiToken" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>api<wbr/>Token</span></a>
32
+ <a href="CameraKitBootstrapConfiguration.html#logger" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>logger?</span></a>
33
+ <a href="CameraKitBootstrapConfiguration.html#logLevel" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>log<wbr/>Level?</span></a>
34
+ <a href="CameraKitBootstrapConfiguration.html#lensPerformance" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>lens<wbr/>Performance?</span></a>
35
+ <a href="CameraKitBootstrapConfiguration.html#lensCoreOverrideUrls" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>lens<wbr/>Core<wbr/>Override<wbr/>Urls?</span></a>
36
+ <a href="CameraKitBootstrapConfiguration.html#wasmEndpointOverride" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>wasm<wbr/>Endpoint<wbr/>Override?</span></a>
37
+ </div></section></div></details></section></section>
38
+ <section class="tsd-panel-group tsd-member-group">
39
+ <h2>Properties</h2>
40
+ <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="apiToken" class="tsd-anchor"></a>
41
+ <h3 class="tsd-anchor-link"><span>api<wbr/>Token</span><a href="#apiToken" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
42
+ <div class="tsd-signature">api<wbr/>Token<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
43
+ <div class="tsd-comment tsd-typography"><p>Long-lived token granting your application access to CameraKit APIs. This is found in the SnapKit Dev Portal,
44
+ where it&#39;s called the API Token.</p>
45
+ </div></section>
46
+ <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="logger" class="tsd-anchor"></a>
47
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>logger</span><a href="#logger" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
48
+ <div class="tsd-signature">logger<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">&quot;noop&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;console&quot;</span></div>
49
+ <div class="tsd-comment tsd-typography"><p>Determine where to print CameraKit log messages. By default no logs will be printed.</p>
50
+ <p>CameraKit emits log messages to help diagnose and root cause issues that may occur during the development of a
51
+ host application. The printing of these can be controlled via the following
52
+ options:</p>
53
+ <ul>
54
+ <li><code>noop</code>: log messages are ignored.</li>
55
+ <li><code>console</code>: log messages are printed to console.</li>
56
+ </ul>
57
+ </div></section>
58
+ <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="logLevel" class="tsd-anchor"></a>
59
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>log<wbr/>Level</span><a href="#logLevel" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
60
+ <div class="tsd-signature">log<wbr/>Level<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">&quot;debug&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;error&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;warn&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;log&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;info&quot;</span></div>
61
+ <div class="tsd-comment tsd-typography"><p>Log only if a logged entry level is greater than or equal to this level. Here is the order of levels:
62
+ error &gt; warn &gt; log = info &gt; debug. Default value is &quot;info&quot;.</p>
63
+ </div></section>
64
+ <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="lensPerformance" class="tsd-anchor"></a>
65
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>lens<wbr/>Performance</span><a href="#lensPerformance" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
66
+ <div class="tsd-signature">lens<wbr/>Performance<span class="tsd-signature-symbol">?:</span> <a href="EstimatedLensPerformance.html" class="tsd-signature-type" data-tsd-kind="Interface">EstimatedLensPerformance</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="EstimatedLensPerformance.html" class="tsd-signature-type" data-tsd-kind="Interface">EstimatedLensPerformance</a><span class="tsd-signature-symbol">&gt;</span></div>
67
+ <div class="tsd-comment tsd-typography"><p>Some lenses may decide to modify their behavior based on the performance of the current environment. If you are
68
+ using such lenses, providing an estimation of lens performance may lead to better user experience (especially on
69
+ low-performance devices).</p>
70
+ <p>Running the <a href="../functions/estimateLensPerformance.html">estimateLensPerformance</a> function will run benchmarks and estimate an appropriate lens
71
+ performance cluster (i.e. a performance rating) based on the current environment.</p>
72
+ <p>Lower cluster = worse expected performance capability.</p>
73
+
74
+ <h3>Example</h3><pre><code class="language-ts"><span class="hl-2">import</span><span class="hl-1"> { </span><span class="hl-0">bootstrapCameraKit</span><span class="hl-1">, </span><span class="hl-0">estimateLensPerformance</span><span class="hl-1"> } </span><span class="hl-2">from</span><span class="hl-1"> </span><span class="hl-3">&#39;@snap/camera-kit</span><span class="hl-10">`</span><br/><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">cameraKit</span><span class="hl-1"> = </span><span class="hl-2">await</span><span class="hl-1"> </span><span class="hl-5">bootstrapCameraKit</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-0">apiToken:</span><span class="hl-1"> </span><span class="hl-3">&#39;...&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">lensPerformance:</span><span class="hl-1"> </span><span class="hl-5">estimateLensPerformance</span><span class="hl-1">(),</span><br/><span class="hl-1">})</span>
75
+ </code></pre>
76
+ </div></section>
77
+ <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="lensCoreOverrideUrls" class="tsd-anchor"></a>
78
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>lens<wbr/>Core<wbr/>Override<wbr/>Urls</span><a href="#lensCoreOverrideUrls" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
79
+ <div class="tsd-signature">lens<wbr/>Core<wbr/>Override<wbr/>Urls<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{ </span>wasm<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>js<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span></div>
80
+ <div class="tsd-comment tsd-typography"><p>In recommended production deployments, the WebAssembly assets required by CameraKit will be downloaded from an
81
+ optimized CDN. But sometimes (e.g. during development or within a CI pipeline), it may be necessary to download
82
+ these assets from somewhere else.</p>
83
+ <p>This configuration option allows the application to specify URLs to be used for both the WebAssembly and JS glue
84
+ file that are used to run and interact with CameraKit&#39;s rendering engine.</p>
85
+ </div>
86
+ <div class="tsd-type-declaration">
87
+ <h4>Type declaration</h4>
88
+ <ul class="tsd-parameters">
89
+ <li class="tsd-parameter">
90
+ <h5>wasm<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li>
91
+ <li class="tsd-parameter">
92
+ <h5>js<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li></ul></div></section>
93
+ <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="wasmEndpointOverride" class="tsd-anchor"></a>
94
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>wasm<wbr/>Endpoint<wbr/>Override</span><a href="#wasmEndpointOverride" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
95
+ <div class="tsd-signature">wasm<wbr/>Endpoint<wbr/>Override<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
96
+ <div class="tsd-comment tsd-typography"><p>In recommended production deployments, the WebAssembly assets required by CameraKit will be downloaded from an
97
+ optimized CDN. But sometimes during development or within a CI pipeline, it may be necessary to download these
98
+ assets from somewhere else. With a provided <code>wasmEndpointOverride</code>, asset URLs will be automatically generated
99
+ based on this root endpoint.</p>
100
+ </div></section></section></div>
101
+ <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
102
+ <div class="tsd-navigation settings">
103
+ <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
104
+ <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
105
+ <div class="tsd-accordion-details">
106
+ <div class="tsd-filter-visibility">
107
+ <h4 class="uppercase">Member Visibility</h4><form>
108
+ <ul id="tsd-filter-options">
109
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
110
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></form></div>
111
+ <div class="tsd-theme-toggle">
112
+ <h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
113
+ <nav class="tsd-navigation primary">
114
+ <details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
115
+ <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
116
+ <div class="tsd-accordion-details">
117
+ <ul>
118
+ <li><a href="../modules.html">Camera<wbr/>Kit <wbr/>Web SDK -<wbr/> v0.7.0-<wbr/>alpha.1</a>
119
+ <ul></ul></li></ul></div></details></nav>
120
+ <nav class="tsd-navigation secondary menu-sticky">
121
+ <ul>
122
+ <li class="current tsd-kind-interface"><a href="CameraKitBootstrapConfiguration.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Camera<wbr/>Kit<wbr/>Bootstrap<wbr/>Configuration</span></a>
123
+ <ul>
124
+ <li class="tsd-kind-property tsd-parent-kind-interface"><a href="CameraKitBootstrapConfiguration.html#apiToken" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>api<wbr/>Token</a></li>
125
+ <li class="tsd-kind-property tsd-parent-kind-interface"><a href="CameraKitBootstrapConfiguration.html#logger" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>logger?</a></li>
126
+ <li class="tsd-kind-property tsd-parent-kind-interface"><a href="CameraKitBootstrapConfiguration.html#logLevel" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>log<wbr/>Level?</a></li>
127
+ <li class="tsd-kind-property tsd-parent-kind-interface"><a href="CameraKitBootstrapConfiguration.html#lensPerformance" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>lens<wbr/>Performance?</a></li>
128
+ <li class="tsd-kind-property tsd-parent-kind-interface"><a href="CameraKitBootstrapConfiguration.html#lensCoreOverrideUrls" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>lens<wbr/>Core<wbr/>Override<wbr/>Urls?</a></li>
129
+ <li class="tsd-kind-property tsd-parent-kind-interface"><a href="CameraKitBootstrapConfiguration.html#wasmEndpointOverride" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg>wasm<wbr/>Endpoint<wbr/>Override?</a></li></ul></li></ul></nav></div></div>
130
+ <div class="container tsd-generator">
131
+ <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
132
+ <div class="overlay"></div><script src="../assets/main.js"></script></body></html>