API | Description |
---|---|
getInstance | Gets a shooting instance. |
setVideoRecordListener | Sets the shooting callback. |
release | Releases resources. |
setVideoProcessListener | Sets the custom image processing callback (not supported in UGSV Lite). |
API | Description |
---|---|
setWatermark | Sets a global watermark (not supported in UGSV Lite). |
getBeautyManager | Gets the beauty filter management object. |
API | Description |
---|---|
startCameraSimplePreview | Starts the camera preview (simplified parameters). |
startCameraCustomPreview | Starts the camera preview (custom parameters). |
setVideoResolution | Sets the shooting resolution. |
setVideoBitrate | Sets the video bitrate for shooting. |
stopCameraPreview | Stops the camera preview. |
switchCamera | Switches between the front and rear cameras. |
setMicVolume | Sets the mic volume. |
toggleTorch | Turns on/off the flashlight. |
getMaxZoom | Gets the maximum zoom factor. You can also use this API to check whether zooming is supported. |
setZoom | Sets the zoom factor. |
setFocusPosition | Sets the focus position manually. |
setVideoRenderMode | Sets the video rendering mode. |
API | Description |
---|---|
startRecord | Starts shooting. The SDK will automatically generate the video path and thumbnail, which are returned by ITXVideoRecordListener. |
startRecord | Starts shooting. |
startRecord | Starts shooting. |
stopRecord | Stops shooting. |
pauseRecord | Pauses shooting. |
resumeRecord | Resumes shooting. |
setAspectRatio | Sets the aspect ratio. |
setRecordSpeed | Sets the shooting speed (not supported in UGSV Lite). |
setMute | Sets whether to mute audio. |
setHomeOrientation | Sets the orientation (in relation to the Home button). |
setRenderRotation | Sets the rotation for rendering. |
API | Description |
---|---|
setReverb | Sets the reverb effect (not supported in UGSV Lite). |
setVoiceChangerType | Sets the voice changing effect (not supported in UGSV Lite). |
setBGM | Sets the background music (not supported in UGSV Lite). |
setBGMNofify | Sets the music playback callback (not supported in UGSV Lite). |
playBGMFromTime | Plays the background music (not supported in UGSV Lite). |
stopBGM | Stops the background music (not supported in UGSV Lite). |
pauseBGM | Pauses the background music (not supported in UGSV Lite). |
resumeBGM | Resumes the background music (not supported in UGSV Lite). |
seekBGM | Sets the start and end time for the background music (not supported in UGSV Lite). |
setBGMVolume | Sets the volume of the background music (not supported in UGSV Lite). |
getMusicDuration | Gets the duration of the music file (not supported in UGSV Lite). |
API | Description |
---|---|
snapshot | Sets the preprocessing callback. |
API | Description |
---|---|
setMotionTmpl | Sets the animated effect (supported in UGSV Enterprise and Enterprise Pro). |
setMotionMute | Sets whether to mute an animated effect (supported in UGSV Enterprise and Enterprise Pro). |
setGreenScreenFile | Sets the green screen (supported in UGSV Enterprise Pro). |
setFaceVLevel | Sets the V shape effect (supported in UGSV Enterprise Pro). |
setFaceShortLevel | Sets the face length (supported in UGSV Enterprise Pro and Enterprise Pro EX). |
setChinLevel | Sets the chin length (supported in UGSV Enterprise Pro and Enterprise Pro EX). |
setNoseSlimLevel | Sets the nose size (supported in UGSV Enterprise Pro and Enterprise Pro EX). |
setEyeScaleLevel | Sets the big eyes effect (supported in UGSV Enterprise Pro and Enterprise Pro EX). |
setFaceScaleLevel | Sets the slim face effect (supported in UGSV Enterprise Pro). |
setBeautyStyle | Sets the beauty style. |
setBeautyDepth | Sets the beautification and brightening strength. |
setFilter | Sets the color filter. |
setFilter | Sets multiple filters. |
setSpecialRatio | Sets the filter strength. |
API | Description |
---|---|
TXUGCPartsManager | The video segment manager. |
setPartsManagerObserver | Sets the callback for processing video segments. |
removePartsManagerObserver | Sets the callback for deleting video segments. |
addClipInfo | Adds a video segment to the end of the list. |
insertPart | Inserts a video segment. |
getDuration | Gets the total duration of all the video segments. |
getPartsPathList | Gets the paths of all the video segments shot. |
deleteLastPart | Deletes the last video segment. |
deletePart | Deletes a specific video segment. |
deleteAllParts | Deletes all the video segments. |
API | Description |
---|---|
onTextureCustomProcess | The texture processing callback. |
onDetectFacePoints | The facial keypoints. |
onTextureDestroyed | The texture releasing callback. |
API | Description |
---|---|
onRecordEvent | A shooting event. |
onRecordProgress | The shooting progress callback. |
onRecordComplete | The shooting ended. |
API | Description |
---|---|
onSnapshot | The screenshot callback. |
API | Description |
---|---|
onBGMStart | The background music started. |
onBGMProgress | The music playback progress. |
onBGMComplete | The background music ended. |
API | Description |
---|---|
TXRecordResult | The shooting result. |
TXUGCSimpleConfig | Preset shooting parameters. |
TXUGCCustomConfig | Custom shooting parameters. |
Message | Code | Description |
---|---|---|
RECORD_RESULT_OK | 0 | The shooting was successful or was paused (stopped). |
RECORD_RESULT_OK_LESS_THAN_MINDURATION | 1 | The shooting was successful. The duration is shorter than the minimum duration allowed. |
RECORD_RESULT_OK_REACHED_MAXDURATION | 2 | The shooting was successful. The duration is longer than the maximum duration allowed. |
RECORD_RESULT_FAILED | -1 | The shooting failed. |
RECORD_RESULT_SUSPEND_FOR_NO_TASK | -2 | An API was called to pause (stop) shooting, but there wasn’t a shooting task. |
RECORD_RESULT_FILE_ERR | -3 | The file does not exist or its duration is 0. This is usually because the interval between when shooting is started, and when it is paused (stopped) is too short. This error does not need to be handled. |
RECORD_RESULT_COMPOSE_SET_SRC_PATH_ERR | -4 | The source video path is invalid. Call mTXUGCPartsManager.getPartsPathList() to check whether the file is empty or its duration is 0. |
RECORD_RESULT_COMPOSE_SET_DST_PATH_ERR | -5 | The target video path is invalid. Check whether the path is empty. |
RECORD_RESULT_COMPOSE_START_ERR | -6 | Failed to generate the video because there is an ongoing task. |
RECORD_RESULT_COMPOSE_CANCEL | -7 | The video was canceled. |
RECORD_RESULT_COMPOSE_VERIFY_FAIL | -8 | Verification for video generation failed because the file does not exist, the file duration is 0, or the video parameters are inconsistent. |
RECORD_RESULT_COMPOSE_INTERNAL_ERR | -9 | The video failed to be generated due to an internal error. |
Message | Code | Description |
---|---|---|
START_RECORD_OK | 0 | Shooting started. |
START_RECORD_ERR_IS_IN_RECORDING | -1 | There was an ongoing task when a request was made to start shooting. |
START_RECORD_ERR_VIDEO_PATH_IS_EMPTY | -2 | The file path is empty when a request was made to start shooting. |
START_RECORD_ERR_API_IS_LOWER_THAN_18 | -3 | The version is earlier than v18. |
START_RECORD_ERR_NOT_INIT | -4 | Initialization was not finished yet when a request was made to start shooting. |
START_RECORD_ERR_LICENCE_VERIFICATION_FAILED | -5 | License verification failed. |
Was this page helpful?