예제 #1
0
        partial void OnRecordButtonClicked(UIBarButtonItem sender)
        {
            // Wait for the recording to start/stop before re-enabling the record button.
            InvokeOnMainThread(() => recordButton.Enabled = false);

            // The recordingWill/DidStop delegate methods will fire asynchronously in the response to this call.
            if (videoProcessor.IsRecording)
            {
                videoProcessor.StopRecording();
            }
            else
            {
                videoProcessor.StartRecording();
            }
        }
예제 #2
0
        public void OnToggleRecording(object sender, EventArgs e)
        {
            // UIBarButtonItem btn = (UIBarButtonItem)sender;

            // Wait for the recording to start/stop before re-enabling the record button.
            InvokeOnMainThread(() => btnRecord.Enabled = false);

            // The recordingWill/DidStop delegate methods will fire asynchronously in the response to this call.
            if (videoProcessor.IsRecording)
            {
                videoProcessor.StopRecording();
            }
            else
            {
                videoProcessor.StartRecording();
            }
        }