Fix check-all script

This commit is contained in:
Marc Rousavy 2021-03-17 15:35:49 +01:00
parent fc4f2e6362
commit 64fcf9f069
3 changed files with 3 additions and 5 deletions

View File

@ -15,8 +15,6 @@ import UIKit
//
// CameraView
// TODO: enableSmoothAutoFocus
// TODO: enableLowLightBoost
// TODO: focus(x, y)
// CameraView+RecordVideo
// TODO: Better startRecording()/stopRecording() (promise + callback, wait for TurboModules/JSI)

View File

@ -89,13 +89,13 @@ final class CameraViewManager: RCTViewManager {
final func getAvailableCameraDevices(_ resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
withPromise(resolve: resolve, reject: reject) {
let discoverySession = AVCaptureDevice.DiscoverySession(deviceTypes: getAllDeviceTypes(), mediaType: .video, position: .unspecified)
let devices = discoverySession.devices.filter({
let devices = discoverySession.devices.filter {
if #available(iOS 11.1, *) {
// exclude the true-depth camera. The True-Depth camera has YUV and Infrared, can't take photos!
return $0.deviceType != .builtInTrueDepthCamera
}
return true
})
}
return devices.map {
return [
"id": $0.uniqueID,

View File

@ -37,7 +37,7 @@
"bootstrap": "yarn example && yarn && yarn pods",
"check-android": "scripts/ktlint.sh",
"check-ios": "scripts/swiftformat.sh && scripts/swiftlint.sh",
"check-all": "scripts/checkall.sh",
"check-all": "scripts/check-all.sh",
"docs": "cd docs && yarn build"
},
"keywords": [