fix: align ReplayKit stopCapture call
This commit is contained in:
@@ -233,8 +233,8 @@ final class ScreenRecordService {
|
|||||||
@MainActor
|
@MainActor
|
||||||
private func startCapture(
|
private func startCapture(
|
||||||
includeAudio: Bool,
|
includeAudio: Bool,
|
||||||
handler: @escaping (CMSampleBuffer, RPSampleBufferType, Error?) -> Void,
|
handler: @escaping @Sendable (CMSampleBuffer, RPSampleBufferType, Error?) -> Void,
|
||||||
completion: @escaping (Error?) -> Void)
|
completion: @escaping @Sendable (Error?) -> Void)
|
||||||
{
|
{
|
||||||
let recorder = RPScreenRecorder.shared()
|
let recorder = RPScreenRecorder.shared()
|
||||||
recorder.isMicrophoneEnabled = includeAudio
|
recorder.isMicrophoneEnabled = includeAudio
|
||||||
@@ -242,8 +242,8 @@ final class ScreenRecordService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
private func stopCapture(_ completion: @escaping (Error?) -> Void) {
|
private func stopCapture(_ completion: @escaping @Sendable (Error?) -> Void) {
|
||||||
RPScreenRecorder.shared().stopCapture(completionHandler: completion)
|
RPScreenRecorder.shared().stopCapture { error in completion(error) }
|
||||||
}
|
}
|
||||||
|
|
||||||
private nonisolated static func clampDurationMs(_ ms: Int?) -> Int {
|
private nonisolated static func clampDurationMs(_ ms: Int?) -> Int {
|
||||||
|
|||||||
Reference in New Issue
Block a user