You can implement the drafts logic as follows:
// Get the first video shooting object
mTXCameraRecord = TXUGCRecord.getInstance(this.getApplicationContext());
// Start shooting
mTXCameraRecord.startRecord();
// Pause shooting
mTXCameraRecord.pauseRecord();
// Get the cached video segment and write it locally
List<string> pathList = mTXCameraRecord.getPartsManager().getPartsPathList(); // Write `pathList` locally
// Open the application again and get the shooting object
mTXCameraRecord2 = TXUGCRecord.getInstance(this.getApplicationContext());
// Preload the locally cached segment
mTXCameraRecord2.getPartsManager().insertPart(videoPath, 0);
// Start shooting
mTXCameraRecord2.startRecord();
// End shooting, and the SDK will compose the cached video segment with the currently shot one
mTXCameraRecord2.stopRecord();
Note:For the specific implementation method, please see the usage of the
RecordDraftManager
class in the shooting module in the UGSV application demo source code.
Was this page helpful?