-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from BlinkID/jenkins/stable-build
Automatically built release by Jenkins
- Loading branch information
Showing
60 changed files
with
2,315 additions
and
2,336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,10 +140,15 @@ to use the SDK in both JavaScript and TypeScript projects. | |
|
||
--- | ||
|
||
Alternatively, it's possible to use UMD builds, which can be loaded from [the `dist` folder on unpkg](https://unpkg.com/@microblink/blinkid-imagecapture-in-browser-sdk/dist/). The UMD builds make `BlinkIDImageCaptureSDK` available as a `window.BlinkIDImageCaptureSDK` global variable: | ||
Alternatively, it's possible to use UMD builds which can be loaded from public CDN services. | ||
|
||
However, **we strongly advise** that you host the JavaScript bundles on your infrastructure since there is no guarantee that the public CDN service has satisfactory uptime and availability throughout the world. | ||
|
||
For example, it's possible to use UMD builds from [the `dist` folder on Unpkg CDN](https://unpkg.com/@microblink/blinkid-imagecapture-in-browser-sdk/dist/). The UMD builds make `BlinkIDImageCaptureSDK` available as a `window.BlinkIDImageCaptureSDK` global variable: | ||
|
||
```html | ||
<script src="https://unpkg.com/@microblink/blinkid-imagecapture-in-browser-sdk/dist/blinkid-imagecapture-sdk.min.js"></script> | ||
<!-- IMPORTANT: change "X.Y.Z" to the version number you wish to use! --> | ||
<script src="https://unpkg.com/@microblink/[email protected]/dist/blinkid-imagecapture-sdk.min.js"></script> | ||
``` | ||
|
||
Finally, it's possible to use ES builds, which can be downloaded from [the `es` folder on unpkg](https://unpkg.com/@microblink/blinkid-imagecapture-in-browser-sdk/es/). ES modules are used in a similar manner as NPM package: | ||
|
@@ -215,7 +220,11 @@ For example, in `package.json` you should have something like `"@microblink/blin | |
import * as BlinkIDImageCaptureSDK from "@microblink/blinkid-imagecapture-in-browser-sdk"; | ||
const recognizer = await BlinkIDImageCaptureSDK.createBlinkIdImageCaptureRecognizer( wasmSDK ); | ||
const recognizerRunner = await BlinkIDImageCaptureSDK.createRecognizerRunner( wasmSDK, [ recognizer ], true ); | ||
const recognizerRunner = await BlinkIDImageCaptureSDK.createRecognizerRunner( | ||
wasmSDK, | ||
[ recognizer ], | ||
true | ||
); | ||
``` | ||
|
||
5. Obtain a reference to your HTML video element and create a `VideoRecognizer` using the element and your instance of `RecognizerRunner` which then can be used to process input video stream: | ||
|
@@ -306,16 +315,16 @@ const loadSettings = new BlinkIDImageCaptureSDK.WasmSDKLoadSettings( "your-base6 | |
* Hello message will contain the name and version of the SDK, which are required information for all support | ||
* tickets. | ||
* | ||
* Default value is true. | ||
* The default value is true. | ||
*/ | ||
loadSettings.allowHelloMessage = true; | ||
/** | ||
* Absolute location of WASM and related JS/data files. Useful when resource files should be loaded over CDN, or | ||
* when web frameworks/libraries are used which store resources in specific locations, e.g. inside "assets" folder. | ||
* | ||
* Important: if the engine is hosted on another origin, CORS must be enabled between two hosts. That is, server where | ||
* engine is hosted must have 'Access-Control-Allow-Origin' header for the location of the web app. | ||
* Important: if the engine is hosted on another origin, CORS must be enabled between two hosts. That is, server | ||
* where engine is hosted must have 'Access-Control-Allow-Origin' header for the location of the web app. | ||
* | ||
* Important: SDK and WASM resources must be from the same version of a package. | ||
* | ||
|
@@ -335,7 +344,7 @@ wasmType: WasmType | null = null; | |
* | ||
* This can be useful for displaying progress bar to users with slow connections. | ||
* | ||
* Default value is "null". | ||
* The default value is "null". | ||
* | ||
* @example | ||
* loadSettings.loadProgressCallback = (percentage: number) => console.log(`${ percentage }% loaded!`); | ||
|
@@ -365,17 +374,19 @@ WASM wrapper contain three different builds: | |
* `Basic` | ||
|
||
* The WASM that will be loaded will be most compatible with all browsers that support the WASM, but will lack features that could be used to improve performance. | ||
|
||
* `Advanced` | ||
|
||
* The WASM that will be loaded will be built with advanced WASM features, such as bulk memory, non-trapping floating point and sign extension. Such WASM can only be executed in browsers that support those features. Attempting to run this WASM in a non-compatible browser will crash your app. | ||
* The WASM that will be loaded will be built with advanced WASM features, such as bulk memory, SIMD, non-trapping floating point and sign extension. Such WASM can only be executed in browsers that support those features. Attempting to run this WASM in a non-compatible browser will crash your app. | ||
|
||
* `AdvancedWithThreads` | ||
|
||
* The WASM that will be loaded will be build with advanced WASM features, just like above. Additionally, it will be also built with support for multi-threaded processing. This feature requires a browser with support for both advanced WASM features and `SharedArrayBuffer`. | ||
|
||
* For multi-threaded processing there are some things that needs to be set up additionally, like COOP and COEP headers, more info about web server setup can be found [here](#wasmsetup). | ||
|
||
* Keep in mind that this WASM bundle requires that all resources are on the same origin. So, for example, it's not possible to load WASM files from some CDN. This limitation exists due to browser security rules. | ||
|
||
_Files: resources/{basic,advanced,advanced-threads}/BlinkID ImageCaptureWasmSDK.{data,js,wasm}_ | ||
|
||
##### Server Configuration | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,21 +39,27 @@ import { Client } from "@microblink/blinkid-imagecapture-in-browser-sdk"; | |
|
||
### <a name="installation-standalone-bundle"></a> Standalone (UMD) bundle | ||
|
||
Since client library is published on NPM, it's possible to load the library via CDN. | ||
Since the client library is published on NPM, it's possible to download the library via public CDN services. | ||
|
||
However, **we strongly advise** that you host the JavaScript bundle on your infrastructure since there is no guarantee that the public CDN service has satisfactory uptime and availability throughout the world. | ||
|
||
```html | ||
<!-- After successful load, global variable `Client` is available. --> | ||
<script src="https://unpkg.com/@microblink/blinkid-imagecapture-in-browser-sdk/client-library/dist/client-library.min.js"></script> | ||
<!-- IMPORTANT: change "X.Y.Z" to the version number you wish to use! --> | ||
<script src="https://unpkg.com/@microblink/[email protected]/client-library/dist/client-library.min.js"></script> | ||
``` | ||
|
||
*Keep in mind that Unpkg CDN is used for demonstration, it's not intended to be used in production!* | ||
|
||
### <a name="installation-es-module"></a> ES module | ||
|
||
The library is also packaged as a classic ES module which can be loaded via CDN. | ||
The library is also packaged as a classic ES module which can be downloaded via public CDN services. | ||
|
||
However, **we strongly advise** that you host the JavaScript bundle on your infrastructure since there is no guarantee that the public CDN service has satisfactory uptime and availability throughout the world. | ||
|
||
```js | ||
import { Client } from "https://unpkg.com/@microblink/blinkid-imagecapture-in-browser-sdk/client-library/es/client-library.mjs"; | ||
/* IMPORTANT: change "X.Y.Z" to the version number you wish to use! */ | ||
import { Client } from "https://unpkg.com/@microblink/[email protected]/client-library/es/client-library.mjs"; | ||
``` | ||
|
||
*Keep in mind that Unpkg CDN is used for demonstration, it's not intended to be used in production!* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.