The content of this page has been automatically translated by AI. If you encounter any problems while reading, you can view the corresponding content in Chinese.
Help & Documentation>User Generated Short Video SDK

iOS

Last updated: 2025-03-17 18:02:38

Implementation steps for the draft box

First Recording

1. Start recording.
2. Suspend/end the first recording.
3. Cache video segments to your local system (draft box).

Second Recording

1. Preload video segments from local cache.
Continue recording.
End recording.
//Get the object of the first video recording
record = [TXUGCRecord shareInstance];

//Start recording
[record startRecord];

//Pause recording and cache video segments
[record pauseRecord:^{
NSArray *videoPathList = record.partsManager.getVideoPathList;
//Write videoPathList locally
}];

//Get the object of the second video recording
record2 = [TXUGCRecord shareInstance];

//Preload local cache fragments
[record2.partsManager insertPart:videoPath atIndex:0];

//Start recording
[record2 startRecord];

//End recording. The SDK will synthesize the cached video clips and the currently recording video clips.
[record2 stopRecord];

Note
For the specific implementation method, refer to the UGCKitRecordViewController class in video source code.