NextLevel
public class NextLevel: NSObject
⬆️ NextLevel, Rad Media Capture in Swift (http://nextlevel.engineering)
-
Undocumented
Declaration
Swift
public class NextLevel: NSObject
-
Undocumented
Declaration
Swift
public class NextLevel: NSObject
-
Undocumented
Declaration
Swift
public class NextLevel: NSObject
-
Undocumented
Declaration
Swift
public class NextLevel: NSObject
-
Undocumented
Declaration
Swift
public class NextLevel: NSObject
-
Undocumented
Declaration
Swift
public class NextLevel: NSObject
-
Live camera preview, add as a sublayer to the UIView’s primary layer.
Declaration
Swift
public var previewLayer: AVCaptureVideoPreviewLayer
-
Configuration for video
Declaration
Swift
public var videoConfiguration: NextLevelVideoConfiguration
-
Configuration for audio
Declaration
Swift
public var audioConfiguration: NextLevelAudioConfiguration
-
Configuration for photos
Declaration
Swift
public var photoConfiguration: NextLevelPhotoConfiguration
-
Undocumented
Declaration
Swift
public class NextLevel: NSObject
-
Indicates whether the capture session automatically changes settings in the app’s shared audio session. By default, is
true
.Declaration
Swift
public var automaticallyConfiguresApplicationAudioSession: Bool = true
-
Checks if a camera device is available for a position.
Parameter
Parameter devicePosition: Camera device position to query.Returns
true
if the camera device exists, otherwise false.Declaration
Swift
public func isCameraDeviceAvailable(withDevicePosition devicePosition: NextLevelDevicePosition) -> Bool
-
The current capture mode of the device.
Declaration
Swift
public var captureMode: NextLevelCaptureMode = .video
-
The current device position.
Declaration
Swift
public var devicePosition: NextLevelDevicePosition = .back
-
When
true
actives device orientation updatesDeclaration
Swift
public var automaticallyUpdatesDeviceOrientation: Bool = false
-
The current orientation of the device.
Declaration
Swift
public var deviceOrientation: NextLevelDeviceOrientation = .portrait
-
When
true
, enables photo capture stabilization.Declaration
Swift
public var photoStabilizationEnabled: Bool = false
-
Video stabilization mode
Declaration
Swift
public var videoStabilizationMode: NextLevelVideoStabilizationMode = .auto
-
Checks if the system is recording.
Declaration
Swift
public var isRecording: Bool
-
Checks if the current capture session is running
Declaration
Swift
public var isRunning: Bool
-
The current recording session, a powerful means for modifying and editing previously recorded clips. The session provides features such as ‘undo’.
Declaration
Swift
public var session: NextLevelSession?
-
Method for providing a NextLevel singleton. This isn’t required for use.
Declaration
Swift
public static let shared = NextLevel()
-
Undocumented
Declaration
Swift
public class NextLevel: NSObject
-
Checks the current authorization status for the desired media type.
Parameter
Parameter mediaType: Specified media type (i.e. AVMediaTypeVideo, AVMediaTypeAudio, etc.)Returns
Authorization status for the desired media type.Declaration
Swift
public func authorizationStatus(forMediaType mediaType: AVMediaType) -> NextLevelAuthorizationStatus
-
Requests authorization permission.
Parameter
Parameter mediaType: Specified media type (i.e. AVMediaTypeVideo, AVMediaTypeAudio, etc.)Declaration
Swift
public func requestAuthorization(forMediaType mediaType: AVMediaType)
-
Starts the current recording session.
Throws
‘NextLevelError.authorization’ when permissions are not authorized, ‘NextLevelError.started’ when the session has already started.Declaration
Swift
public func start() throws
-
Stops the current recording session.
Declaration
Swift
public func stop()
-
Freezes the live camera preview layer.
Declaration
Swift
public func freezePreview()
-
Un-freezes the live camera preview layer.
Declaration
Swift
public func unfreezePreview()
-
Checks if a flash is available.
Declaration
Swift
public var isFlashAvailable: Bool
-
The flash mode of the device.
Declaration
Swift
public var flashMode: NextLevelFlashMode
-
Checks if a torch is available.
Declaration
Swift
public var isTorchAvailable: Bool
-
Torch mode of the device.
Declaration
Swift
public var torchMode: NextLevelTorchMode
-
Checks if focusing at a point of interest is supported.
Declaration
Swift
public var isFocusPointOfInterestSupported: Bool
-
Checks if focus lock is supported.
Declaration
Swift
public var isFocusLockSupported: Bool
-
Checks if focus adjustment is in progress.
Declaration
Swift
public var isAdjustingFocus: Bool
-
The focus mode of the device.
Declaration
Swift
public var focusMode: NextLevelFocusMode
-
Focuses, exposures, and adjusts white balanace at the point of interest.
Parameter
Parameter adjustedPoint: The point of interest.Declaration
Swift
public func focusExposeAndAdjustWhiteBalance(atAdjustedPoint adjustedPoint: CGPoint)
-
Changes focus at adjusted point of interest.
Parameter
Parameter adjustedPoint: The point of interest for focusDeclaration
Swift
public func focusAtAdjustedPointOfInterest(adjustedPoint: CGPoint)
-
Checks if exposure lock is supported.
Declaration
Swift
public var isExposureLockSupported: Bool
-
Checks if an exposure adjustment is progress.
Declaration
Swift
public var isAdjustingExposure: Bool
-
The exposure mode of the device.
Declaration
Swift
public var exposureMode: NextLevelExposureMode
-
Changes exposure at adjusted point of interest.
Parameter
Parameter adjustedPoint: The point of interest for exposure.Declaration
Swift
public func exposeAtAdjustedPointOfInterest(adjustedPoint: CGPoint)
-
Calculates focal length and principle point camera intrinsic parameters for OpenCV. (see Hartley’s Mutiple View Geometry, Chapter 6)
- Parameters:
- focalLengthX: focal length along the x-axis
- focalLengthY: focal length along the y-axis
- principlePointX: principle point x-coordinate
- principlePointY: principle point y-coordinate
Returns
true
when the focal length and principle point parameters are successfully calculated.Declaration
Swift
public func focalLengthAndPrinciplePoint(focalLengthX: inout Float, focalLengthY: inout Float, principlePointX: inout Float, principlePointY: inout Float) -> Bool
- Parameters:
-
Changes the current capture device’s mirroring mode.
Declaration
Swift
public var mirroringMode: NextLevelMirroringMode
-
Changes the current device frame rate.
Declaration
Swift
public var frameRate: CMTimeScale
-
Changes the current device frame rate within the desired dimensions.
- Parameters:
- frameRate: Desired frame rate.
- dimensions: Desired video dimensions.
Declaration
Swift
public func updateDeviceFormat(withFrameRate frameRate: CMTimeScale, dimensions: CMVideoDimensions)
- Parameters:
-
Triggers a camera device position change.
Declaration
Swift
public func flipCaptureDevicePosition()
-
Changes capture device if the desired device is available.
Declaration
Swift
public func changeCaptureDeviceIfAvailable(captureDevice: NextLevelDeviceType) throws
-
Checks if video capture is supported by the hardware.
Declaration
Swift
public var supportsVideoCapture: Bool
-
Checks if video capture is available, based on available storage and supported hardware functionality.
Declaration
Swift
public var canCaptureVideo: Bool
-
Updates video capture zoom factor.
Declaration
Swift
public var videoZoomFactor: Float
-
Triggers a photo capture from the last video frame.
Declaration
Swift
public func capturePhotoFromVideo()
-
Enables delegate callbacks for rendering into a custom context. videoDelegate, func nextLevel(_ nextLevel: NextLevel, renderToCustomContextWithImageBuffer imageBuffer: CVPixelBuffer, onQueue queue: DispatchQueue)
Declaration
Swift
public var isVideoCustomContextRenderingEnabled: Bool
-
Settings this property passes a modified buffer into the session for writing. The property is only observed when ‘isVideoCustomContextRenderingEnabled’ is enabled. Setting it to nil avoids modification for a frame.
Declaration
Swift
public var videoCustomContextImageBuffer: CVPixelBuffer?
-
Initiates video recording, managed as a clip within the ‘NextLevelSession’
Declaration
Swift
public func record()
-
Pauses video recording, preparing ‘NextLevel’ to start a new clip with ‘record()’
Declaration
Swift
public func pause()
-
Pauses video recording, preparing ‘NextLevel’ to start a new clip with ‘record()’ with completion handler.
Parameter
Parameter completionHandler: Completion handler for when pause completesDeclaration
Swift
public func pause(withCompletionHandler completionHandler: (() -> Void)?)
-
Checks if a photo capture operation can be performed, based on available storage space and supported hardware functionality.
Declaration
Swift
public var canCapturePhoto: Bool
-
Triggers a photo capture.
Declaration
Swift
public func capturePhoto()
-
Undocumented
Declaration
Swift
public class NextLevel: NSObject
-
Undocumented
Declaration
Swift
public class NextLevel: NSObject
-
Undocumented
Declaration
Swift
public class NextLevel: NSObject
-
Undocumented
Declaration
Swift
public class NextLevel: NSObject
-
Undocumented
Declaration
Swift
public class NextLevel: NSObject
-
Undocumented
Declaration
Swift
public class NextLevel: NSObject
-
Undocumented
Declaration
Swift
public class NextLevel: NSObject
-
Undocumented
Declaration
Swift
public class NextLevel: NSObject
-
Undocumented
Declaration
Swift
public class NextLevel: NSObject