1 | /**
|
2 | * An object containing details about the support level of the used OS/browser combination regarding
|
3 | * the features needed by this library.
|
4 | */
|
5 | export interface BrowserCompatibility {
|
6 | /**
|
7 | * Whether the full set of features required to have continuous camera video streaming are supported.
|
8 | */
|
9 | readonly fullSupport: boolean;
|
10 | /**
|
11 | * Whether the set of features required to use a [[Scanner]] to perform scans ("single image mode") are supported.
|
12 | */
|
13 | readonly scannerSupport: boolean;
|
14 | /**
|
15 | * The list of features that are missing.
|
16 | */
|
17 | readonly missingFeatures: BrowserCompatibility.Feature[];
|
18 | }
|
19 |
|
20 | export namespace BrowserCompatibility {
|
21 | /**
|
22 | * Browser feature.
|
23 | */
|
24 | export enum Feature {
|
25 | /**
|
26 | * [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) -
|
27 | * [current support?](https://caniuse.com/#feat=blobbuilder)
|
28 | */
|
29 | BLOB = "blob",
|
30 | /**
|
31 | * [MediaDevices/getUserMedia](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia) -
|
32 | * [current support?](https://caniuse.com/#feat=stream)
|
33 | */
|
34 | MEDIA_DEVICES = "mediaDevices",
|
35 | /**
|
36 | * [OffscreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas) -
|
37 | * [current support?](https://caniuse.com/#feat=offscreencanvas)
|
38 | */
|
39 | OFFSCREEN_CANVAS = "offscreenCanvas",
|
40 | /**
|
41 | * [URL/createObjectURL](https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL) -
|
42 | * [current support?](https://caniuse.com/#feat=bloburls)
|
43 | */
|
44 | URL_OBJECT = "urlObject",
|
45 | /**
|
46 | * [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) -
|
47 | * [current support?](https://caniuse.com/#feat=webworkers)
|
48 | */
|
49 | WEB_WORKERS = "webWorkers",
|
50 | /**
|
51 | * [WebAssembly](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_objects/WebAssembly) -
|
52 | * [current support?](https://caniuse.com/#feat=wasm)
|
53 | */
|
54 | WEB_ASSEMBLY = "webAssembly",
|
55 | /**
|
56 | * WebAssembly without memory corruption (specific iOS version 11.2.2/11.2.5/11.2.6 bug)
|
57 | */
|
58 | WEB_ASSEMBLY_ERROR_FREE = "webAssemblyErrorFree",
|
59 | /**
|
60 | * [WebGL](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API) -
|
61 | * [current support?](https://caniuse.com/#feat=webgl)
|
62 | */
|
63 | WEBGL = "webgl"
|
64 | }
|
65 | }
|