●現象
captureDevice?.activeVideoMinFrameDuration = CMTimeMake(1, 30)
みたいにフレームレート設定で落ちる
●対策
lockForConfiguration()とunlockForConfiguration()で挟むとOK
do { try captureDevice?.lockForConfiguration() // フレームレート設定 captureDevice?.activeVideoMinFrameDuration = CMTimeMake(1, 30) captureDevice?.activeVideoMaxFrameDuration = CMTimeMake(1, 30) captureDevice?.unlockForConfiguration() } catch _ { }
コメント