Send onInitialized
event only if device changed
This commit is contained in:
@@ -153,7 +153,6 @@ extension CameraSession {
|
||||
|
||||
// Done!
|
||||
ReactLogger.log(level: .info, message: "Successfully configured all outputs!")
|
||||
delegate?.onSessionInitialized()
|
||||
}
|
||||
|
||||
// pragma MARK: Orientation
|
||||
|
@@ -160,6 +160,11 @@ class CameraSession: NSObject, AVCaptureVideoDataOutputSampleBufferDelegate, AVC
|
||||
|
||||
// Update successful, set the new configuration!
|
||||
self.configuration = config
|
||||
|
||||
// Notify about Camera initialization
|
||||
if difference.inputChanged {
|
||||
delegate?.onSessionInitialized()
|
||||
}
|
||||
} catch {
|
||||
self.onConfigureError(error)
|
||||
}
|
||||
|
Reference in New Issue
Block a user