All files / src/lib browserCompatibility.ts

100% Statements 10/10
100% Branches 4/4
100% Functions 2/2
100% Lines 10/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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