AVRecorder.VideoDeviceCount
---------------------------

Queries number of video devices found by the plugin.

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

MBS( "AVRecorder.VideoDeviceCount"; AVSession ) 

**MBS**( **"AVRecorder.VideoDeviceCount";** /\* Queries number of video devices found by the plugin. \*/  
**$AVSession**) /\* The ID for the AVRecorder session as returned by [AVRecorder.Init](AVRecorderInit.md). \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| AVSession | The ID for the AVRecorder session as returned by [AVRecorder.Init](AVRecorderInit.md). | $AVSession |

### Result

Returns number or error.

### Description

Queries number of video devices found by the plugin.  
Calling this function will rebuild the device list, so you can query it with the other functions like [AVRecorder.VideoDeviceInfo](AVRecorderVideoDeviceInfo.md).  
This should find built-in webcam as well as external USB cameras.  
### See also

- [AVRecorder.AudioDeviceCount](AVRecorderAudioDeviceCount.md)
- [AVRecorder.EncoderInfo](AVRecorderEncoderInfo.md)
- [AVRecorder.Init](AVRecorderInit.md)
- [AVRecorder.SetVideoDevice](AVRecorderSetVideoDevice.md)
- [AVRecorder.VideoDeviceInfo](AVRecorderVideoDeviceInfo.md)

### Example Databases

- [AVRecorder/AVRecorder Devices](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/AVRecorder/AVRecorder%20Devices.shtml#1ScriptAnchor_)

This function checks for a license.

Created 18th February 2016 , last changed 5th February 2024

  
[AVRecorder.StopRecording](AVRecorderStopRecording.md) - [AVRecorder.VideoDeviceInfo](AVRecorderVideoDeviceInfo.md)

[HTML Version](AVRecorderVideoDeviceCount.shtml)