VKRecorderViewControllerDelegate
public protocol VKRecorderViewControllerDelegate
-
willStartCamera(_:
Default implementation) Before camera is started
Default Implementation
Declaration
Swift
func willStartCamera(_ recorder: VKRecorder)
-
didStartCamera(_:
Default implementation) After camera has been started
Default Implementation
Declaration
Swift
func didStartCamera(_ recorder: VKRecorder)
-
willStartRecording(_:
Default implementation) Before recording started (Tap on recording button)
Default Implementation
Declaration
Swift
func willStartRecording(_ recorder: VKRecorder)
-
didBecomeReadyToRecord(_:
Default implementation) Called when the recorder is ready to start recording
Default Implementation
Declaration
Swift
func didBecomeReadyToRecord(_ recorder: VKRecorder)
-
didStartRecording(_:
Default implementation) After recording has been started
You can retrieve the recording session through recorder.session
Default Implementation
Declaration
Swift
func didStartRecording(_ recorder: VKRecorder)
-
didPauseRecording(clip:
Default implementationrecorder: ) After recording has been stopped clip is the recorded clip
Default Implementation
Declaration
Swift
func didPauseRecording(clip: VKRecorderClip, recorder: VKRecorder)
-
didSetupUI()
Default implementationAfter UI is setup and initialized Use this delegate to make changes to the UI
Default Implementation
Declaration
Swift
func didSetupUI()
-
didSetupRecordButton(button:
Default implementation) After record button is setup Use this delegate to make changes to the record button (e.g. change it’s color)
Default Implementation
Declaration
Swift
func didSetupRecordButton(button: VKRecordButton)
-
shouldStartRecording(button:
Default implementation) Fired when the record button was tapped Return false if you do not want the recording to start, true if recording should start, default is always true
Default Implementation
Declaration
Swift
func shouldStartRecording(button: VKRecordButton) -> Bool
-
didSelectVideoFromCameraRoll(videoUrl:
Default implementation) Video from camera roll was selected
Default Implementation
Declaration
Swift
func didSelectVideoFromCameraRoll(videoUrl: URL)
-
didSelectImageFromCameraRoll(image:
Default implementation) Image from camera roll was selected
Default Implementation
Declaration
Swift
func didSelectImageFromCameraRoll(image: UIImage)
-
configure(video:
Default implementationaudio: ) Configure is called after setting the default video and audio configuration You can modify settings by modifying the VKRecorderVideoConfiguration and VKRecorderAudioConfiguration parameters
Default Implementation
Declaration
Swift
func configure(video: VKRecorderVideoConfiguration, audio: VKRecorderAudioConfiguration)
-
didTapNextButton(_:
Default implementation) Next button was tapped You can extract the recorded clips from recorder.sesson
Default Implementation
Declaration
Swift
func didTapNextButton(_ recorder: VKRecorder)
-
After merging/stitching all recorded clips together mergedClipUrl is the final video file
Declaration
Swift
func didFinishMergingClips(_ recorder: VKRecorder, mergedClipUrl: URL, autoMerged: Bool)
-
Called if merge did fail
Declaration
Swift
func didFailMergingClips(_ recorder: VKRecorder, error: Error, autoMerged: Bool)
-
didSelectRecordingLength(_:
Default implementationpicker: ) After horizontal picker view item was selected
Default Implementation
Declaration
Swift
func didSelectRecordingLength(_ recordingLength: VKRecordingLength, picker: VKHorizontalPicker)
-
didExit(_:
Default implementationrecordingViewController: ) Called if recordingViewController was closed If presenting modally, you’d need to dismiss the view using recordingViewController.dismiss()
Default Implementation
Declaration
Swift
func didExit(_ recorder: VKRecorder, recordingViewController: VKRecorderViewController)
-
exitMenuDidTapStartOver(_:
Default implementation) Start Over has been tapped on the exit confirmation dialog
Default Implementation
Declaration
Swift
func exitMenuDidTapStartOver(_ recorder: VKRecorder)
-
exitMenuDidTapExit(_:
Default implementation) Exit has been tapped on the exit confirmation dialog
Default Implementation
Declaration
Swift
func exitMenuDidTapExit(_ recorder: VKRecorder)
-
didFinishMergingClips(_:
Extension methodmergedClipUrl: ) Declaration
Swift
func didFinishMergingClips(_ recorder: VKRecorder, mergedClipUrl: URL)
-
didFailMergingClips(_:
Extension methoderror: ) Declaration
Swift
func didFailMergingClips(_ recorder: VKRecorder, error: Error)