API | Description |
Sets the permission provider for handling runtime permissions in the editing workflow, such as storage and microphone permissions. | |
Initializes the editor timeline with a list of asset paths, builds the project, and refreshes the preview and duration information. | |
Initializes the editor with an existing draft, loads the draft content, and resets the draft context. | |
Should be called when the host screen enters onResume; it resumes playback or refreshes the player based on whether playback should be resumed, and notifies the panels to resume. | |
Should be called when the host screen enters onPause; it pauses the player and notifies the panels to pause. | |
Checks whether the player is currently playing. | |
Handles the back button event. Panels and layers consume it first, and returns whether the event has been handled. | |
Should be called when the host is destroyed to release player-related resources and clean up global Toast references. | |
Sets the material provider used internally by the UI to fetch, select, or display business material resources. | |
Returns the FrameLayout corresponding to the pre-edit layer, allowing the host to add custom views to the pre-edit screen. | |
Switches the editing layer based on the input enum value (such as pre-edit, main edit, full-screen preview, motion editing, etc.). | |
Switches the feature panel based on the input enum value (such as text, voiceover, filter, sticker, etc.), or closes the current panel. | |
Sets a panel change listener to receive the current panel type when the feature panel switches. | |
Sets a layer change listener to receive the current layer type when the editing layer switches. | |
Saves the current editing state as a draft and returns the generated TAVDraft object. | |
Returns the current draft object for external persistence or later restoration. | |
Returns the editing operation entry point ITAVEditOperator for low-level editing operations on tracks, effects, and more. | |
Derives an offscreen editor instance and returns its identifier for background rendering or export. | |
Sets the Next click callback. When the user taps Next, it returns the current frame and other results. | |
Sets the maximum editable duration and automatically updates the playback range based on that duration. | |
Sets the minimum editable duration to limit the minimum project duration. | |
Returns the offscreen frame provider to obtain rendered frames of the editing result at the specified long-edge size. | |
Retrieves a Bitmap frame at the specified time and returns the result asynchronously through a callback. | |
Sets an edit interceptor to intercept and customize key editing actions (such as deletion and applying effects) before execution. | |
Sets a player status listener to listen for playback state changes (play, pause, finish, etc.). | |
Sets a draft change listener to receive notifications when the draft content changes. | |
Sets the offscreen video player provider to customize offscreen playback/rendering implementation. | |
Returns the current preview render size for UI adaptation. | |
Sets the resource root path used by the editing UI. |
public void setPermissionProvider(ITAVPermissionProvider provider)Parameter | Type | Description |
provider | Permission provider/request adapter interface instance. |
void public void initWithClipPath(List<String> pathList)Parameter | Type | Description |
pathList | List<String> | A list of asset paths, which can be video or image file paths. |
void public void initWithDraft(TAVDraft draft)Parameter | Type | Description |
draft | TAVDraft | A previously saved draft object. |
void onResume.public void onResume(boolean resumePlay)Parameter | Type | Description |
resumePlay | boolean | Whether to resume playback automatically: true attempts to resume playback, and false only refreshes the frame. |
void onPause() callback.public void onPause()void public boolean isPlaying()boolean false for external handling.public boolean onBackPressed()boolean onDestroy().public void onDestroy()void public void setMaterialProvider(ITAVMaterialProvider provider)Parameter | Type | Description |
provider | Material data provider interface instance. |
void public FrameLayout getPreEditLayer()FrameLayout FrameLayout.BaseLayer based on the input enum type and triggers the layer change callback.public void showLayer(TAVEditorUIConstants.TAVLayer layer)Parameter | Type | Description |
layer | TAVEditorUIConstants.TAVLayer | The desired layer type to display, such as PRE_EDIT、MAIN_EDIT、FULL_PREVIEW、MOTION_EDIT |
void public void showPanel(TAVEditorUIConstants.TAVPanel panel)Parameter | Type | Description |
panel | TAVEditorUIConstants.TAVPanel | The panel type to display, such as NONE、TEXT、VOICEOVER、FILTER、STICKER |
void public void setPanelChangedListener(TAVPanelChangedListener listener)Parameter | Type | Description |
listener | TAVPanelChangedListener | Panel change listener instance. It can be null to remove the listener. |
void public void setLayerChangedListener(TAVLayerChangedListener listener)Parameter | Type | Description |
listener | TAVLayerChangedListener | Layer change listener instance. It can be null to remove the listener. |
void TAVDraft object and returns the draft.public TAVDraft saveDraft()TAVDraft TAVDraft itself.saveDraft , this method only returns the in-memory draft object reference and does not actively save it.public TAVDraft getDraft()TAVDraft public ITAVEditOperator getEditOperator()public String forkOffscreenEditor()String public void setNextClickCallback(TAVCallback<Bitmap> callback)Parameter | Type | Description |
callback | TAVCallback<Bitmap> | The callback triggered when Next is clicked. The parameter is the cover or current-frame Bitmap and can be null to clear the callback. |
void public void setMaxEditDuration(long duration)Parameter | Type | Description |
duration | long | The maximum editable duration, in microseconds (us). |
void public void setMinEditDuration(long duration)Parameter | Type | Description |
duration | long | The minimum editable duration, in microseconds (us). |
void public ITAVFrameProvider getFrameProvider(int longSide)Parameter | Type | Description |
longSide | int | The long-edge size of the target rendered image, in pixels. |
ITAVFrameProvider Bitmap.public void getFrameAtTime(long timeUs, int longSide, TAVConsumer<Bitmap> consumer)Parameter | Type | Description |
timeUs | long | The target time, in microseconds (us). |
longSide | int | The long-edge size of the rendered image, in pixels. |
consumer | TAVConsumer<Bitmap> | The render result callback. The parameter is the Bitmap. |
void public void setEditInterceptor(ITAVEditInterceptor interceptor)Parameter | Type | Description |
interceptor | ITAVEditInterceptor | The edit operation interceptor instance. It can be null to remove the interception. |
void public void setPlayerStatusListener(TAVPlayerStatusListener listener)Parameter | Type | Description |
listener | TAVPlayerStatusListener | Player status listener instance. It can be null to remove the listener. |
void public void setDraftChangeListener(TAVDraftChangeListener listener)Parameter | Type | Description |
listener | TAVDraftChangeListener | Draft change listener instance. It can be null to remove the listener. |
void public void setOffScreenVideoPlayer(ITAVProvider<ITAVOffScreenVideoPlayer> provider)Parameter | Type | Description |
provider | ITAVProvider<ITAVOffScreenVideoPlayer> | The off-screen player provider used to create the actual player instance. |
void public Size getRenderSize()Size public void setResourceRootPath(String path)Parameter | Type | Description |
path | String | The absolute path or prefix of the resource root directory. |
void boolean hasPermission(String permission)Parameter | Type | Description |
permission | String | The permission name to check (such as android.permission.RECORD_AUDIO). |
boolean PermissionResultReceiver callback.void requirePermission(String permission, int requestCode, PermissionResultReceiver receiver)Parameter | Type | Description |
permission | String | The permission name to request (such as android.permission.RECORD_AUDIO). |
requestCode | int | The permission request code used by the upper layer to distinguish different request scenarios. |
receiver | PermissionResultReceiver | The permission request result callback receiver instance used to receive the grant result. |
void PermissionResultReceiver callback.requirePermission is called, this callback is triggered after the user completes the action (allow/deny) in the system permission dialog.void onPermissionResult(boolean granted)Parameter | Type | Description |
granted | boolean | For true, it indicates that the permission was granted successfully; for false, it indicates that the user denied the request or authorization failed. |
void ITAVBgmResultHandler callback.void getBgmFile(int requestCode, ITAVBgmResultHandler handler)Parameter | Type | Description |
requestCode | int | The request code used to distinguish BGM selection requests in different business scenarios. |
handler | The background music selection result callback interface used to return the material selected by the user. |
void handler callback.TAVAlbumOptions to control the maximum selection count, resource type, source, and so on; the result is returned by ITAVAlbumResultHandler callback.void getAlbumFiles(int requestCode, TAVAlbumOptions options, ITAVAlbumResultHandler handler)Parameter | Type | Description |
requestCode | int | The request code used to distinguish different album selection request scenarios. |
options | The album selection configuration, including the maximum selection count, resource type, source, and so on. | |
handler | The album selection result callback interface used to return the list of materials selected by the user. |
void handler callback.ITAVMaterialProvider.getBgmFile(...) ends (whether successfully or not), this method must be called back to notify UIKit of the corresponding selection result. void onBgmSelectResult(int requestCode, TAVBgmResource resource)Parameter | Type | Description |
requestCode | int | The request code of this BGM selection request, used to distinguish selection results in different business scenarios. |
resource | TAVBgmResource | The selected BGM resource object; the specific fields are defined by TAVBgmResource and may be null. |
void ITAVMaterialProvider.getAlbumFiles(...) ends (regardless of whether the user actually selected materials), this method must be called back to notify UIKit of the corresponding selection result. void onAlbumSelectResult(int requestCode, List<TAVAlbumResource> resourceList)Parameter | Type | Description |
requestCode | int | The request code of this album selection request, used to distinguish selection results in different business scenarios. |
resourceList | List<TAVAlbumResource> | The list of album materials selected by the user; it may be empty when the user makes no selection or cancels. |
void getAlbumFiles to guide the UI and material filtering logic.Field | Type | Description |
count | int | The maximum number of selectable materials. For example, 1 means only a single file can be selected. |
type | The resource type (for example, video only, image only, or mixed type), defined by TAVBaseResource.TYPE. | |
from | TAVEditorUIConstants.TAVResourceFrom | The material source type (such as system album, built-in materials, etc.), defined by TAVResourceFrom. |
Enum Value | Description |
BGM | Background music resource, audio only. |
PHOTO | Image resource, still image only. |
VIDEO | Video resource, video file only. |
MULTI | Mixed multi-type resource, which can include both images and videos. |
void onPanelChanged(TAVEditorUIConstants.TAVPanel panel)Parameter | Type | Description |
panel | TAVEditorUIConstants.TAVPanel | The currently displayed panel type, such as TEXT, VOICEOVER, FILTER, etc. |
void void onLayerChanged(TAVEditorUIConstants.TAVLayer layer)Parameter | Type | Description |
layer | TAVEditorUIConstants.TAVLayer | The currently displayed layer type, such as PRE_EDIT, MAIN_EDIT, etc. |
void API | Description |
Returns the list of all primary track clip models in the current project List<TAVClipModel>. | |
Returns the list of all background music models in the current project List<TAVBgmModel>. | |
Returns the list of all voiceover models in the current project List<TAVVoiceoverModel>. | |
Returns the list of all text models in the current project List<TAVTextModel>. | |
Returns the list of all overlay models in the current project List<TAVOverlayModel>. | |
Batch-updates the editing model list (such as BGM, text, voiceover, and overlay) by synchronizing the project based on the input models. | |
Adds a list of editing models to the current project. | |
Batch-removes the specified list of editing models from the current project. | |
Activates the specified editing model, usually making it the current selected item and entering the editable state. |
List<TAVClipModel> getClipModels()List<TAVClipModel> List<TAVBgmModel> getBgmModels()List<TAVBgmModel> List<TAVVoiceoverModel> getVoiceoverModels()List<TAVVoiceoverModel> List<TAVTextModel> getTextModels()List<TAVTextModel> List<TAVOverlayModel> getOverlayModels()List<TAVOverlayModel> void updateEditModels(List<? extends TAVEditModel<?>> models)Parameter | Type | Description |
models | List<? extends TAVEditModel<?>> | The list of editing models to update. BGM, voiceover, text, and other types are supported. |
void void setEditModels(List<? extends TAVEditModel<?>> models)Parameter | Type | Description |
models | List<? extends TAVEditModel<?>> | The list of editing models to add. |
void void removeEditModel(List<? extends TAVEditModel<?>> models)Parameter | Type | Description |
models | List<? extends TAVEditModel<?>> | The list of editing models to be deleted, removed by model ID/identifier. |
void void activeEditModel(TAVEditModel<?> model)Parameter | Type | Description |
model | TAVEditModel<?> | The editing model to activate, which can be BGM, voiceover, text, etc. |
void 피드백