Пример #1
0
        public static void Renew(object s)
        {
            if (rec != null)
            {
                rec.StopRecording();
            }

            var configuration = new CameraRecorderConfiguration()
            {
                VideosFolderPath = Directory.GetCurrentDirectory() + @"\Camera\",
                VideoFormat      = ".mpeg4"
            };

            rec = new CameraRecorder(cam, configuration);
            rec.StartRecording();
        }
        public void OnCameraButtonClick()
        {
            float timeDiff = Time.time - timeAtCameraButtonPressed;

            timeAtCameraButtonPressed = 0f;

            if (timeDiff <= holdTimeToStartRecording)
            {
                StopRecordingAttempt();
                pictureFrame.SetActive(true);
                OnStartedTakingFootage.Invoke();
                cameraRecorder.TakePicture();
            }
            else
            {
                cameraRecorder.StopRecording();
                recordingIndicator.SetActive(false);
            }
        }