Setup the camera preview.
Setup and configure a capture session.
Start/stop the session when appropriate. These methods create a new "session" instance for 'VKRecorder.shared.session' when called.
Our VideoKit recorder offers two different modes to record your video
- Multi-clip and
- Single video
Multi-clip mode is used to record several clips that can later on be rearranged, trimmed or deleted individually. This mode is very flexible since it enables you to offer editing options for all recordings of your session. We would not recommend using multi-clip recording if you just need one quick recording and you do not want to allow rearranging or editing of single clips (e.g. in a messaging app). We help minimizing waiting times for the user by offering auto-merging but still there might be waiting times involved for putting the clips together.
Single video mode is recording all clips into one big video file automatically. With this mode, you can pause and start your recording and all subsequent videos are automatically stitched to the end of the previous recording. There is no merging required at the end and this mode also provides our Upload While Recording functionality for instantaeous availability of recordings.
Let's get into the basics of these two modes:
This mode lets you record one clip at a time, clips are then available for you to edit. Start off with enabling multi clip mode:
You can put this code in your viewDidLoad, right next to your other videoConfiguration settings. Please note that you can only enable this mode before you start your video session (
Your Session now holds three clips
Since our multi-clip mode writes multiple video clips into the video session, you are able to remove and rearrange clips.
Remove second clip:
We offer a way to retrieve thumbnail images for each clip which will make it easy for you to display your recordings:
Reposition second clip to appear as first:
Once you finished rearranging and editing your clips, you might want to merge all clips together into a single video file:
url is your final video file that you can then upload to our backend:
Next to the manual merging process, we also offer automatic merging, which is triggered after a recording is finished (After
Auto merging is disabled by default, but you can activate it through
To get notified once an auto merging process is finished, implement the following merge delegates:
This mode automatically stitches together all recordings made using
If you now start and pause three video recordings, your session will only hold one video clip with all three videos automatically stiteched together. This reduces the time it needs to merge clips together but most importantly, is required for our Upload While Recording process.
Your Session now holds one clip, but all three recordings are automatically added at the end.
Using our single video mode, there is no need to merge any clips together, for uploading the video all you need to do is grab the url of the first clip in your recording session.