fix: Make recorder less error-prone (#189)

* Abort recording if failed to start or empty frames

* Activate Audio Session on `cameraQueue`

* Double-check stop recording in callback

* Only call callback once

* Format

* Add description to `.aborted` error

* Update RecordingSession.swift

* Update AVAudioSession+updateCategory.swift

* Rename serial dispatch queues
This commit is contained in:
Marc Rousavy
2021-06-09 14:56:56 +02:00
committed by GitHub
parent 02168e1f28
commit 5919d46a46
7 changed files with 97 additions and 35 deletions

View File

@@ -39,6 +39,7 @@ export type CaptureError =
| 'capture/capture-type-not-supported'
| 'capture/video-not-enabled'
| 'capture/photo-not-enabled'
| 'capture/aborted'
| 'capture/unknown';
export type SystemError = 'system/no-camera-manager';
export type UnknownError = 'unknown/unknown';