Platforms to show: All Mac Windows Linux Cross-Platform

Back to AVCaptureDeviceMBS class.

AVCaptureDeviceMBS.activeFormat as AVCaptureDeviceFormatMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The currently active format of the receiver.

You use this property to get or set the currently active device format.

To set the format, you must first obtain exclusive access to the receiver using focusMode. If you do not obtain exclusive access, setActiveFormat throws an NSGenericException.

The set method, setActiveFormat, throws an NSInvalidArgumentException if you pass a format not present in the supportsAVCaptureSessionPreset array.

You can observe changes to the value of this property using key-value observing.
(Read and Write property)

Some examples using this property:

AVCaptureDeviceMBS.activeInputSource as AVCaptureDeviceInputSourceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The currently active input source.

You use this property to get or set the currently active input source.

To set the format, you must first obtain exclusive access to the receiver using focusMode. If you do not obtain exclusive access, setActiveInputSource throws an NSGenericException.

The set method, setActiveInputSource, throws an NSInvalidArgumentException if you pass a format not present in the activeInputSource array.

You can observe changes to the value of this property using key-value observing.
(Read and Write property)

AVCaptureDeviceMBS.activeVideoMaxFrameDuration as CMTimeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 14.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The currently active maximum frame duration.

A device's maximum frame duration is the reciprocal of its minimum frame rate. You can set the value of this property to limit the minimum frame rate during a capture session. The capture device automatically chooses a default maximum frame duration based on its active format. After changing the value of this property, you can return to the default maximum frame duration by setting this property's value to kCMTimeInvalid. Choosing a new preset for the capture session also resets this property to its default value.

Attempting to set this property to a value not found in the active format's videoSupportedFrameRateRanges array raises an exception (NSInvalidArgumentException).

Before changing the value of this property, you must call lockForConfiguration to acquire exclusive access to the device's configuration properties. Otherwise, setting the value of this property raises an exception. When you are done configuring the device, call unlockForConfiguration to release the lock and allow other devices to configure the settings.

You can observe changes to the value of this property using Key-value observing.
Available in OS X v10.9 and later.
(Read and Write property)

AVCaptureDeviceMBS.activeVideoMinFrameDuration as CMTimeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The currently active minimum frame duration.

You use this property to get or set the currently active minimum frame duration.

The value of this property is the reciprocal of its maximum frame rate. To limit the maximum frame rate, you can set the value of this property to a value supported by the receiver's modelID (see videoSupportedFrameRateRanges).

Before changing the value of this property, you must call lockForConfiguration to acquire exclusive access to the device's configuration properties. If you do not, setting the value of this property raises an exception. When you are done configuring the device, call unlockForConfiguration to release the lock and allow other devices to configure the settings.

The device object throws NSInvalidArgumentException if you try to assign an unsupported value to this property.

You can observe changes to the value of this property using key-value observing.
(Read and Write property)

Some examples using this property:

AVCaptureDeviceMBS.canPerformReactionEffects as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 23.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Indicates whether reactions can be performed on a particular AVCaptureDevice.
Example
Var device as AVCaptureDeviceMBS // your device
if device <> nil then
MessageBox "canPerformReactionEffects: "+device.canPerformReactionEffects.ToString
end if

This requires reactionEffectsEnabled to be true, as well as using a AVCaptureDeviceFormat with reactionEffectsSupported.

This readonly property returns YES when resources for reactions are available on the device instance. When true, calls to performEffectForReaction: will render on the video feed, otherwise those calls are ignored. It is key-value observable.

Requires macOS 14.0 or iOS 17.0.
You may check AVCaptureReactionEffectStateMBS.available for whether this is available.
(Read only property)

AVCaptureDeviceMBS.exposureMode as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The exposure mode for the device.

Before changing the value of this property, you must call lockForConfiguration: to acquire exclusive access to the device's configuration properties. If you do not, setting the value of this property raises an exception. When you are done configuring the device, call unlockForConfiguration to release the lock and allow other devices to configure the settings.

You can observe changes to the value of this property using key-value observing.
See "AVCaptureExposureMode" for possible values.
(Read and Write property)

Some examples using this property:

AVCaptureDeviceMBS.exposurePointOfInterest as CGPointMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The point of interest for exposure.

Before changing the value of this property, you must call lockForConfiguration to acquire exclusive access to the device's configuration properties. If you do not, setting the value of this property raises an exception. When you are done configuring the device, call unlockForConfiguration to release the lock and allow other devices to configure the settings.
(Read and Write property)

Some examples using this property:

AVCaptureDeviceMBS.flashMode as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The current flash mode.

Before changing the value of this property, you must call lockForConfiguration: to acquire exclusive access to the device's configuration properties. If you do not, setting the value of this property raises an exception. When you are done configuring the device, call unlockForConfiguration to release the lock and allow other devices to configure the settings.

You can observe changes to the value of this property using key-value observing.

See "AVCaptureFlashMode" for possible values.
(Read and Write property)

Some examples using this property:

AVCaptureDeviceMBS.focusMode as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The device's focus mode.

Before changing the value of this property, you must call lockForConfiguration to acquire exclusive access to the device's configuration properties. If you do not, setting the value of this property raises an exception. When you are done configuring the device, call unlockForConfiguration to release the lock and allow other devices to configure the settings.

You can observe changes to the value of this property using key-value observing.

See "AVCaptureFocusMode" for possible values.
(Read and Write property)

Some examples using this property:

AVCaptureDeviceMBS.focusPointOfInterest as CGPointMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The point of interest for focusing.

This property represents a CGPoint where {0,0} corresponds to the top left of the picture area, and {1,1} corresponds to the bottom right in landscape mode with the home button on the right—this applies even if the device is in portrait mode.

Before changing the value of this property, you must call lockForConfiguration to acquire exclusive access to the device's configuration properties. If you do not, setting the value of this property raises an exception. When you are done configuring the device, call unlockForConfiguration to release the lock and allow other devices to configure the settings.
(Read and Write property)

Some examples using this property:

AVCaptureDeviceMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The internal object reference.

(Read and Write property)

AVCaptureDeviceMBS.hasFlash as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Indicates whether the capture device has a flash. (read-only)
Example
Var device as AVCaptureDeviceMBS
device = AVCaptureDeviceMBS.defaultDeviceWithMediaType(AVFoundationMBS.AVMediaTypeVideo)
MsgBox str(device.hasFlash)

You can observe changes to the value of this property using key-value observing.
(Read only property)

Some examples using this property:

AVCaptureDeviceMBS.hasTorch as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
A Boolean value that specifies whether the capture device has a torch. (read-only)
Example
Var device as AVCaptureDeviceMBS
device = AVCaptureDeviceMBS.defaultDeviceWithMediaType(AVFoundationMBS.AVMediaTypeVideo)
MsgBox str(device.hasTorch)

A torch is a light source, such as an LED flash, that is available on the device and used for illuminating captured content or providing general illumination. This property reflects whether the current device has such illumination hardware built-in.

Even if the device has a torch, that torch might not be available for use. Thus, you should also check the value of the torchAvailable property before using it.

You can observe changes to the value of this property using key-value observing.
(Read only property)

Some examples using this property:

AVCaptureDeviceMBS.isAdjustingExposure as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The transport type of the receiver. (read-only)
Example
Var device as AVCaptureDeviceMBS
device = AVCaptureDeviceMBS.defaultDeviceWithMediaType(AVFoundationMBS.AVMediaTypeVideo)
MsgBox str(device.isAdjustingExposure)

The value of this property represents the transport type of the device (USB, PCI, etc). Transport types are defined in <IOKit/audio/IOAudioTypes.h> as kIOAudioDeviceTransportType*.
(Read only property)

Some examples using this property:

AVCaptureDeviceMBS.isAdjustingFocus as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Indicates whether the device is currently adjusting its focus setting. (read-only)
Example
Var device as AVCaptureDeviceMBS
device = AVCaptureDeviceMBS.defaultDeviceWithMediaType(AVFoundationMBS.AVMediaTypeVideo)
MsgBox str(device.isAdjustingFocus)

You can observe changes to the value of this property using key-value observing.
(Read only property)

Some examples using this property:

AVCaptureDeviceMBS.isAdjustingWhiteBalance as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Indicates whether the devise is currently adjusting the white balance. (read-only)
Example
Var device as AVCaptureDeviceMBS
device = AVCaptureDeviceMBS.defaultDeviceWithMediaType(AVFoundationMBS.AVMediaTypeVideo)
MsgBox str(device.isAdjustingWhiteBalance)

You can observe changes to the value of this property using key-value observing.
(Read only property)

Some examples using this property:

AVCaptureDeviceMBS.isConnected as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Indicates whether the device is currently connected. (read-only)
Example
Var device as AVCaptureDeviceMBS
device = AVCaptureDeviceMBS.defaultDeviceWithMediaType(AVFoundationMBS.AVMediaTypeVideo)
MsgBox str(device.isConnected)

The value of this property indicates whether the device represented by the receiver is connected and available for use as a capture device. When the value of this property becomes false for a given instance, however, it will not become true again. If the same physical device again becomes available to the system, it will be represented using a new instance of AVCaptureDevice.

You can observe the value of this property using key-value observing to be notified when a device is no longer available.
(Read only property)

AVCaptureDeviceMBS.isExposurePointOfInterestSupported as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Indicates whether the device supports a point of interest for exposure. (read-only)
Example
Var device as AVCaptureDeviceMBS
device = AVCaptureDeviceMBS.defaultDeviceWithMediaType(AVFoundationMBS.AVMediaTypeVideo)
MsgBox str(device.isExposurePointOfInterestSupported)

You can observe changes to the value of this property using key-value observing.
(Read only property)

Some examples using this property:

AVCaptureDeviceMBS.isFocusPointOfInterestSupported as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Indicates whether the device supports a point of interest for focus. (read-only)
Example
Var device as AVCaptureDeviceMBS
device = AVCaptureDeviceMBS.defaultDeviceWithMediaType(AVFoundationMBS.AVMediaTypeVideo)
MsgBox str(device.isFocusPointOfInterestSupported)

You can observe changes to the value of this property using key-value observing.
(Read only property)

Some examples using this property:

AVCaptureDeviceMBS.isInUseByAnotherApplication as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Indicates whether the device is in use by another application. (read-only)
Example
Var device as AVCaptureDeviceMBS
device = AVCaptureDeviceMBS.defaultDeviceWithMediaType(AVFoundationMBS.AVMediaTypeVideo)
MsgBox str(device.isInUseByAnotherApplication)

You can observe changes to the value of this property using key-value observing.
(Read only property)

Some examples using this property:

AVCaptureDeviceMBS.isRampingVideoZoom as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 22.2 ❌ No ❌ No ❌ No ✅ Yes iOS only
A Boolean value that indicates whether a zoom transition is in progress.

(Read only property)

AVCaptureDeviceMBS.isSuspended as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Indicates whether the device is suspended. (read-only)
Example
Var device as AVCaptureDeviceMBS
device = AVCaptureDeviceMBS.defaultDeviceWithMediaType(AVFoundationMBS.AVMediaTypeVideo)
MsgBox str(device.isSuspended)

Some devices disallow data capture due to a feature on the device.

For example, isSuspended returns true for an external iSight camera when its privacy iris is closed, or for the internal iSight camera on a notebook when the notebook's display is closed.

You can observe changes to the value of this property using key-value observing.
(Read only property)

AVCaptureDeviceMBS.localizedName as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
A localized human-readable name for the receiver. (read-only)
Example
Var device as AVCaptureDeviceMBS = AVCaptureDeviceMBS.defaultDeviceWithMediaType(AVFoundationMBS.AVMediaTypeAudio)
MsgBox device.localizedName

You can use this property to display the name of a capture device in a user interface.
(Read only property)

AVCaptureDeviceMBS.manufacturer as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 14.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The human-readable manufacturer name for the receiver.

This property can be used to identify capture devices from a particular manufacturer. All Apple devices return "Apple Inc.". Devices from third party manufacturers may return an empty string.
Available on Mac OS X 10.9 or later.
(Read only property)

AVCaptureDeviceMBS.maxAvailableVideoZoomFactor as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 22.2 ❌ No ❌ No ❌ No ✅ Yes iOS only
The maximum zoom factor allowed in the current capture configuration.

On single-camera devices, this value is always equal to the device format’s videoMaxZoomFactor value. On a dual-camera device, the allowed range of video zoom factors can change if the device is delivering depth data to one or more capture outputs.
Setting the videoZoomFactor property to (or calling the rampToVideoZoomFactor:withRate method with) a value greater than the device format’s videoMaxZoomFactor value always raises an exception. Setting the video zoom factor to a value between the maximum available zoom factor and the device format’s maximum clamps the zoom setting to the maximum available value.
(Read only property)

AVCaptureDeviceMBS.minAvailableVideoZoomFactor as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 22.2 ❌ No ❌ No ❌ No ✅ Yes iOS only
The minimum zoom factor allowed in the current capture configuration.

On single-camera devices, this value is always 1.0. On a dual-camera device, the allowed range of video zoom factors can change if the device is delivering depth data to one or more capture outputs.

Setting the videoZoomFactor property to (or calling the rampToVideoZoomFactor method with) a value less than 1.0 always raises an exception. Setting the video zoom factor to a value between 1.0 and the minimum available zoom factor clamps the zoom setting to the minimum.
(Read only property)

AVCaptureDeviceMBS.modelID as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The model ID of the device. (read-only)
Example
Var device as AVCaptureDeviceMBS
device = AVCaptureDeviceMBS.defaultDeviceWithMediaType(AVFoundationMBS.AVMediaTypeVideo)

MsgBox "modelID: "+device.modelID

The value of this property is an identifier unique to all devices of the same model. The value is persistent across device connections and disconnections, and across different systems. For example, the model ID of the camera built in to two identical iPhone models will be the same even though they are different physical devices.
(Read only property)

Some examples using this property:

AVCaptureDeviceMBS.position as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Indicates the physical position of the device hardware on the system. (read-only)

You can observe changes to the value of this property using key-value observing.
See "AVCaptureDevicePosition" for possible values.
(Read only property)

AVCaptureDeviceMBS.torchMode as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The current torch mode.

Setting the value of this property also sets the torch level to its maximum current value.

Before setting the value of this property, call the isTorchModeSupported method to make sure the device supports the desired mode. Setting the device to an unsupported torch mode results in the raising of an exception. For a list of possible values for this property, see "AVCaptureTorchMode."

Before changing the value of this property, you must call lockForConfiguration to acquire exclusive access to the device's configuration properties. If you do not, setting the value of this property raises an exception. When you are done configuring the device, call unlockForConfiguration to release the lock and allow other devices to configure the settings.

You can observe changes to the value of this property using key-value observing.
(Read and Write property)

AVCaptureDeviceMBS.transportControlsPlaybackMode as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The current playback mode. (read-only)

This property is only valid for devices that support transport control.
You can observe changes to the value of this property using key-value observing.
(Read only property)

Some examples using this property:

AVCaptureDeviceMBS.transportControlsSpeed as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The current playback speed. (read-only)

For devices that support transport control, the value of this property indicates the current playback speed of the deck. The following table gives examples of the meaning of values:

ValueMeaning
0.0Stopped
1.0Forward at normal speed.
-1.0Reverse at normal speed.
2.0Forward at 2x normal speed.

You can observe changes to the value of this property using key-value observing.
(Read only property)

Some examples using this property:

AVCaptureDeviceMBS.transportControlsSupported as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Indicates whether the device supports transport control commands. (read-only)
Example
Var device as AVCaptureDeviceMBS = AVCaptureDeviceMBS.defaultDeviceWithMediaType(AVFoundationMBS.AVMediaTypeVideo)
MsgBox str(device.transportControlsSupported)

For devices with transport controls, such as AVC tape-based camcorders or pro capture devices with RS422 deck control, the value of this property is true. If transport controls are not supported, none of the associated transport control methods and properties are available on the receiver.

You can observe changes to the value of this property using key-value observing.
(Read only property)

Some examples using this property:

AVCaptureDeviceMBS.transportType as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The transport type of the receiver. (read-only)

The value of this property represents the transport type of the device (USB, PCI, etc). Transport types are defined in <IOKit/audio/IOAudioTypes.h> as kIOAudioDeviceTransportType*.
(Read only property)

AVCaptureDeviceMBS.uniqueID as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
An ID unique to the model of device corresponding to the receiver. (read-only)
Example
Var device as AVCaptureDeviceMBS
device = AVCaptureDeviceMBS.defaultDeviceWithMediaType(AVFoundationMBS.AVMediaTypeVideo)
Var u as string = device.uniqueID
MsgBox "uniqueID: "+u

Every available capture device has a unique ID that persists on one system across device connections and disconnections, application restarts, and reboots of the system itself. You can store the value returned by this property to recall or track the status of a specific device in the future.
(Read only property)

AVCaptureDeviceMBS.videoZoomFactor as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 22.2 ❌ No ❌ No ❌ No ✅ Yes iOS only
A value that controls the cropping and enlargement of images captured by the device.

This value is a multiplier. For example, a value of 2.0 doubles the size of an image’s subject (and halves the field of view). Allowed values range from 1.0 (full field of view) to the value of the active format’s videoMaxZoomFactor property. Setting the value of this property jumps immediately to the new zoom factor. For a smooth transition, use the rampToVideoZoomFactor method.
(Read and Write property)

AVCaptureDeviceMBS.whiteBalanceMode as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The current white balance mode.

Before changing the value of this property, you must call lockForConfiguration to acquire exclusive access to the device's configuration properties. If you do not, setting the value of this property raises an exception. When you are done configuring the device, call unlockForConfiguration to release the lock and allow other devices to configure the settings.

You can observe changes to the value of this property using key-value observing.
See "AVCaptureWhiteBalanceMode" for possible values.
(Read and Write property)

Some examples using this property:

The items on this page are in the following plugins: MBS AVFoundation Plugin.


The biggest plugin in space...