示例#1
0
        /// <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();
            }
        }
示例#2
0
 private void OnCameraUnauthorized(object sender, EventArgs e)
 {
     CameraUnauthorized?.Invoke(this, e);
 }