---
sourceDocument: Xanadu-API-Referenz
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/de-DE/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - de-DE

ft:publication_title :

    - Xanadu-API-Referenz

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# cabrillo.camera -- Client

# cabrillo.camera -- Client {#ariaid-title1}

* Freigeben Version: Xanadu
* 
* Aktualisiert 1. August 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 Minute Lesedauer

Cabrillo JS Kamerafunktionen zum Zugriff auf die Kamera für das Scannen von Barcodes.

## cabrillo.camera -- getBarcode() {#ariaid-title2}

Bietet eine Standardschnittstelle zum Scannen von Barcodes. Verwenden Sie diese Option, um einen Barcode-Scanner anzuzeigen und das gescannte Ergebnis zu erfassen.
Unterstützte Barcodetypen.

* 1D-Barcodes: EAN-13, EAN-8, UPC-A, UPC-E, Code-39, Code-93, Code-128, ITF
* 2D-Barcodes: QR-Code, DataMatrix, PDF-417, AZTEC
{#CC-getBarcode__ul_uls_1gf_wbb}
{#CC-getBarcode__table_ah1_tff_wbb__entry__3}

| Name | Typ | Beschreibung |
|-|-|-|
| Keine |   |   |
[Tabelle : 1. Parameter]

{#CC-getBarcode__table_ah1_tff_wbb} {#CC-getBarcode__table_bh1_tff_wbb__entry__2}

| Typ | Beschreibung |
|-|-|
| promise | Löst sich zu einer Barcode-Zeichenfolge auf, oder, wenn die Operation fehlschlägt, zu einem Fehler. |
[Tabelle : 2. Ergebnisse]

{#CC-getBarcode__table_bh1_tff_wbb}  

    cabrillo.camera.getBarcode().then(function(barcode) {
        if (barcode) {
            console.log('Scanned barcode.', barcode);
        } else {
            console.log('User cancelled scanning barcode.');
        }
    }, function(error) {
        console.log('Failed to scan barcode.', error);
    });


