Functions that allow an Eitri-App to use the device's camera through the operating system's native APIs.

Methods

Methods

  • Opens the camera and scans selected codes: (qr, aztec, dataMatrix, pdf417, code128 and ean13)

    Eitri now supports the Code Scanner module.

    Important information:

    • Following the example in bifrost doc, if the module is not present, Eitri will fall back to the standard camera scanner implementation.
    • This module offers enhanced performance and more customization options.

    Parameters

    • param: { formats?: [CodeFormats] }

      Object containing an optional "formats" attribute that allowlists which formats are supported.

      • Optionalformats?: [CodeFormats]

        Array of strings representing the formats to be scanned. If not provided, all formats are supported.

    Returns Promise<string>

    returns the content of the code as a string if one is scanned.

    This method is deprecated. It is recommended that you use the Code Scanner module instead.