You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func captureVideo() throws {
guard let captureSession = self.captureSession, captureSession.isRunning else {
throw CameraControllerError.captureSessionIsMissing
}
let path = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask)[0]
let identifier = UUID()
let randomIdentifier = identifier.uuidString.replacingOccurrences(of: "-", with: "")
let finalIdentifier = String(randomIdentifier.prefix(8))
let fileName="cpcp_video_"+finalIdentifier+".mp4"
let fileUrl = path.appendingPathComponent(fileName)
try? FileManager.default.removeItem(at: fileUrl)
// Start recording video
// ...
// Save the file URL for later use
self.videoFileURL = fileUrl
}
On iOS I cant seem to fetch or read the file using fetch or the capacitor filesystem.
File is always "Not found".
On Android it returns: result.videoFilePath
On iOS it returns: result.videoUrl (with file://)
This can't be fetched since it only supports http.
The filesystem also says it's not found.
Any idea on how to solve this?
I've tried:
A normal
fetch(result.videoUrl)
won't work.EDIT
This should work according to the capacitor docs:
But this isn't working for me. File not found.
The text was updated successfully, but these errors were encountered: