tencent cloud


Last updated: 2022-05-24 16:02:37

You can implement the drafts logic as follows:

First Shooting

  1. Start shooting.
  2. Pause/End the first shooting.
  3. Cache the video segment locally (in drafts).

Second Shooting

  1. Preload the locally cached video segment.
  2. Resume shooting.
  3. End shooting.
// Get the first video shooting object
mTXCameraRecord = TXUGCRecord.getInstance(this.getApplicationContext());

// Start shooting

// Pause shooting

// 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

// End shooting, and the SDK will compose the cached video segment with the currently shot one

For the specific implementation method, please see the usage of the RecordDraftManager class in the shooting module in the UGSV application demo source code.

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support