fix: Fix torch not working on iOS (#2031)

* fix: Fix `torch` not working on iOS

* Format

* fix: Use `withSessionLock` and `withDeviceLock`

* Update CameraSession.swift

* Update RecordingSession.swift
This commit is contained in:
Marc Rousavy
2023-10-18 18:04:58 +02:00
committed by GitHub
parent 6956fded2d
commit 89dfd351e0
4 changed files with 90 additions and 55 deletions

View File

@@ -36,10 +36,16 @@ class RecordingSession {
private var hasWrittenFirstVideoFrame = false
private var isFinishing = false
/**
Gets the file URL of the recorded video.
*/
var url: URL {
return assetWriter.outputURL
}
/**
Get the duration (in seconds) of the recorded video.
*/
var duration: Double {
guard let latestTimestamp = latestTimestamp,
let initialTimestamp = initialTimestamp else {