AVRecorder.StartQRCodeDetection
-------------------------------

Starts QRCode detection.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [AVRecorder](component_AVRecorder.md) | [8.4](newinversion84.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |

MBS( "AVRecorder.StartQRCodeDetection"; AVSession { ; FileName; ScriptName } ) 

**MBS**( **"AVRecorder.StartQRCodeDetection";** /\* Starts QRCode detection. \*/  
**$AVSession**; /\* The ID for the AVRecorder session as returned by [AVRecorder.Init](AVRecorderInit.md). \*/   
**$FileName**; /\* Optional; The database file name where the script is located.e.g. "test.fmp12" \*/   
**$ScriptName**) /\* Optional; The script to trigger if a barcode was detected.e.g. "MyScript" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| AVSession | The ID for the AVRecorder session as returned by [AVRecorder.Init](AVRecorderInit.md). | $AVSession |  |
| FileName | The database file name where the script is located. | "test.fmp12" | Optional |
| ScriptName | The script to trigger if a barcode was detected. | "MyScript" | Optional |

### Result

Returns OK or error.

### Description

Starts QRCode detection.  
Optionally, we can trigger script when a new barcode is detected.  
Parameter to the script is the session ID for the recording.  
  
If you need different detection, you can always get current frame with [AVRecorder.CaptureStillPhoto](AVRecorderCaptureStillPhoto.md) and pass it to [OCR.SetImage](OCRSetImage.md) for text recognition or [Barcode.Detect](BarcodeDetect.md) to find different barcodes.  
  
Added Windows support in version 15.4.  
### Examples

Start QRCode recognition:

 Set Variable \[ $r ; Value: MBS ("AVRecorder.StartQRCodeDetection"; AVRecorder::Session ; Get(FileName); "GotBarcode") \]  
### See also

- [AVRecorder.CaptureStillPhoto](AVRecorderCaptureStillPhoto.md)
- [AVRecorder.Init](AVRecorderInit.md)
- [AVRecorder.StopQRCodeDetection](AVRecorderStopQRCodeDetection.md)
- [Barcode.Detect](BarcodeDetect.md)
- [OCR.SetImage](OCRSetImage.md)

### Release notes

- **Version 8.4**
    - Added [AVRecorder.CurrentQRCode](http://www.mbsplugins.eu/AVRecorderCurrentQRCode.shtml), [AVRecorder.HasQRCode](http://www.mbsplugins.eu/AVRecorderHasQRCode.shtml), [AVRecorder.StartQRCodeDetection](http://www.mbsplugins.eu/AVRecorderStartQRCodeDetection.shtml), [AVRecorder.StopQRCodeDetection](http://www.mbsplugins.eu/AVRecorderStopQRCodeDetection.shtml) functions for live barcode detection on MacOS and iOS.

### Blog Entries

- [AVRecorder on iOS](https://www.mbsplugins.de/archive/2020-07-16/AVRecorder_on_iOS/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.4pr6](https://www.mbsplugins.de/archive/2018-09-01/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 29th August 2018 , last changed 28th August 2025

  
[AVRecorder.StartPreview](AVRecorderStartPreview.md) - [AVRecorder.StartRecording](AVRecorderStartRecording.md)

[HTML Version](AVRecorderStartQRCodeDetection.shtml)