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

 Release :

    - yokohama

ft:locale :

    - de-DE

ft:publication_title :

    - Yokohama-API-Referenz

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# cabrillo.camera -- Client

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

* Freigeben Version: Yokohama
* 
* Aktualisiert 30. Januar 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 Minute Lesedauer

Cabrillo JS Kamerafunktionen, um Kamerazugriff für Barcode-Scans bereitzustellen.

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

Stellt eine Standardschnittstelle zum Scannen von Barcodes bereit. Verwenden Sie diese Option, um einen Strichcode-Scanner anzuzeigen und gescannte Ergebnisse 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, Datenmatrix, 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 |
|-|-|
| Versprechen | Wird in eine Barcodezeichenfolge aufgelöst, oder wenn der Vorgang fehlschlägt, wird ein Fehler ausgegeben. |
[Tabelle : 2. Rückgaben]

{#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);
    });


