/// <summary> /// Start the camera /// </summary> public virtual void StartCamera() { var status = AVCaptureDevice.GetAuthorizationStatus(AVMediaType.Video); if (status == AVAuthorizationStatus.Authorized) { Session?.StartRunning(); } else if (status == AVAuthorizationStatus.Denied || status == AVAuthorizationStatus.Restricted) { CameraUnauthorized?.Invoke(this, EventArgs.Empty); Session?.StopRunning(); } }
private void OnCameraUnauthorized(object sender, EventArgs e) { CameraUnauthorized?.Invoke(this, e); }