Platforms to show: All Mac Windows Linux Cross-Platform
Back to AVCaptureVideoPreviewLayerMBS class.
AVCaptureVideoPreviewLayerMBS.captureDevicePointOfInterestForPoint(pointInLayer as CGPointMBS) as CGPointMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 22.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
pointInLayer: A CGPoint in layer coordinates.
Returns a CGPoint in the coordinate space of the capture device providing input to the layer.
AVCaptureDevice pointOfInterest is expressed as a CGPoint where {0,0} represents the top left of the picture area, and {1,1} represents the bottom right on an unrotated picture. This convenience method converts a point in the coordinate space of the receiver to a point of interest in the coordinate space of the AVCaptureDevice providing input to the receiver. The conversion takes frameSize and videoGravity into consideration.
AVCaptureVideoPreviewLayerMBS.connection as AVCaptureConnectionMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
If you invoke Constructor, layerWithSession, or set session with a valid AVCaptureSession instance, a connection is formed to the first eligible video AVCaptureInput object. If the preview layer is detached from a session, the connection property becomes nil.
AVCaptureVideoPreviewLayerMBS.Constructor(session as AVCaptureSessionMBS, WithConnection as boolean = true)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Only pass WithConnection=false here if you intend to manually form a connection between a desired AVCaptureInputPort object and the receiver using addConnection.
AVCaptureVideoPreviewLayerMBS.metadataOutputRectOfInterestForRect(rectInLayerCoordinates as CGRectMBS) as CGRectMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 22.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
rectInLayerCoordinates: A CGRect in layer coordinates.
Returns a CGRect in the coordinate space of the metadata output whose capture device is providing input to the layer.
AVCaptureMetadataOutput rectOfInterest is expressed as a CGRect where {0,0} represents the top left of the picture area, and {1,1} represents the bottom right on an unrotated picture. This convenience method converts a rectangle in the coordinate space of the receiver to a rectangle of interest in the coordinate space of an AVCaptureMetadataOutput whose AVCaptureDevice is providing input to the receiver. The conversion takes frame size and videoGravity into consideration.
AVCaptureVideoPreviewLayerMBS.pointForCaptureDevicePointOfInterest(captureDevicePointOfInterest as CGPointMBS) as CGPointMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 22.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
captureDevicePointOfInterest: A CGPoint in the coordinate space of the capture device providing input to the layer.
Returns a CGPoint in layer coordinates.
AVCaptureDevice pointOfInterest is expressed as a CGPoint where {0,0} represents the top left of the picture area, and {1,1} represents the bottom right on an unrotated picture. This convenience method converts a point in the coordinate space of the AVCaptureDevice providing input to the coordinate space of the receiver. The conversion takes frame size and videoGravity into consideration.
AVCaptureVideoPreviewLayerMBS.rectForMetadataOutputRectOfInterest(rectInMetadataOutputCoordinates as CGRectMBS) as CGRectMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 22.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
rectInMetadataOutputCoordinates: A CGRect in the coordinate space of the metadata output whose capture device is providing input to the layer.
Returns a CGRect in layer coordinates.
AVCaptureMetadataOutput rectOfInterest is expressed as a CGRect where {0,0} represents the top left of the picture area, and {1,1} represents the bottom right on an unrotated picture. This convenience method converts a rectangle in the coordinate space of an AVCaptureMetadataOutput whose AVCaptureDevice is providing input to the coordinate space of the receiver. The conversion takes frame size and videoGravity into consideration.
AVCaptureVideoPreviewLayerMBS.session as AVCaptureSessionMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
(Read and Write computed property)
AVCaptureVideoPreviewLayerMBS.setSessionWithNoConnection(session as AVCaptureSessionMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This method attaches the receiver to a given session without implicitly forming a connection to the first eligible video AVCaptureInputPort object. You should only use this method if you intend to manually form a connection between a desired AVCaptureInputPort object and the receiver using addConnection.
AVCaptureVideoPreviewLayerMBS.videoGravity as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Options are AVLayerVideoGravityResizeAspect, AVLayerVideoGravityResizeAspectFill and AVLayerVideoGravityResize. The default is AVLayerVideoGravityResizeAspect.
This property is animatable.
(Read and Write computed property)
The items on this page are in the following plugins: MBS AVFoundation Plugin.