Properties | Type | Description |
TAVEditor *editor | TAVMagic editing SDK. | |
TAVEditorPreviewMenuView *menuView | Parent view for the vertical button bar on the right side of the interface. | |
TAVPreviewBgmView *bgmView | BGM display view, hidden by default. | |
UIButton *backButton | UIButton | Back button in the upper-left corner. |
UIButton *nextButton | UIButton | Next button. |
void (^nextClickCallback)(void) | Block | Next button tap event. |
void (^shouldHideMenuView)(void) | Block | Callback when menuView is hidden. |
void (^shouldShowMenuView)(void) | Block | Callback when menuView is shown. |
NSTimeInterval minimumEditableDuration | NSTimeInterval | Minimum editing duration, default 6s. |
NSTimeInterval maximumEditableDuration | NSTimeInterval | Maximum editing duration, default 60 * 60s. |
id<ITAVMaterialProvider> materialProvider | Resource provider. Methods in this protocol are called when the user taps to add video/image/BGM within the KIT. You can customize the resource picker UI through this protocol. | |
id<ITAVEditInterceptor> editInterceptor | Edit interceptor that intercepts whether certain operations can proceed, such as whether the current track position can be split, limiting the maximum number of tracks of a specific type, etc. |
Method | Description |
Initialize the editor controller with an array of videos/images. | |
Initialize the editor controller with a draft. | |
Initialize the editor controller with an SDK instance. | |
Navigate to the editing page. | |
Navigate to the editing page and select the first BGM track. | |
Open the BGM picker panel to select a BGM. | |
Open the text sticker panel to add a text sticker. | |
Open the volume settings panel to adjust the volume. | |
Navigate to the recording panel to add a voiceover. | |
Recording IDs tracked by the business logic, used to distinguish BGM from voiceover. |
-(instancetype)initWithAssetPath:(NSString *)assetPath resources:(NSArray <TAVAlbumResource *>*)resources;Parameter Name | Type | Description |
assetPath | NSString * | lightCore.bundle Path to the model resources. Pass nil by default, retrieved from mainBundle. |
resources | NSArray <TAVAlbumResource *>* | Array of initial input resources. |
instancetype-(instancetype)initWithAssetPath:(NSString *)assetPath draft:(TAVDraft *)draft;Parameter Name | Type | Description |
assetPath | NSString * | lightCore.bundle Path to the model resources. Pass nil by default, retrieved from mainBundle. |
draft | TAVDraft * | The draft object to load. |
instancetypeTAVEditor object to create a new controller instance.-(instancetype)initWithTavEditor:(TAVEditor *)editor;Parameter Name | Type | Description |
editor | TAVEditor * | SDK editor object. |
instancetype-(void)pushEditController;void-(void)pushEditAndSelectBgmTrack;void-(void)showBgmSelectionPanel;void-(void)showTextInputPanel;void-(void)showVolumePanel;void-(void)gotoVoiceoverPanel;void-(NSArray *)voiceoverIds;NSArray *Properties | Type | Description |
UIButton *adjustBtn | UIButton | Button to navigate to the main track editing page. |
UIButton *textBtn | UIButton | Add text button. |
UIButton *musicBtn | UIButton | Add music button. |
UIButton *stickerBtn | UIButton | Add sticker button. |
UIButton *filterBtn | UIButton | Add filter button. |
UIButton *effectBtn | UIButton | Add effect button. |
Properties | Type | Description |
UIImageView *iconView | UIImageView | Music icon. |
UILabel *textView | UILabel | Music text label. |
UIButton *deleteBtn | UIButton | Delete music button. |
Method | Description |
Set whether BGM is present. |
-(void)setContainBgm:(BOOL)hasBgm;Parameter Name | Type | Description |
hasBgm | BOOL | Indicates whether BGM is currently present. If YES, shows the delete button and sets the default audio icon; if NO, hides the delete button and sets a loading audio icon. |
voidType Name | Type Definition | Description |
handleBgmSelectResultFunc | typedef void(^handleBgmSelectResultFunc)(TAVBgmResource *bgmResource); | Block for handling BGM selection results, returning the selected BGM resource object via callback. |
handleAlbumSelectResultFunc | typedef void(^handleAlbumSelectResultFunc)(NSArray<TAVAlbumResource *> *resourceList); | Block for handling album file selection results, returning a list of selected media resource objects via callback. |
handler callback with the selected resource.-(void)getBgmWithHandler:(handleBgmSelectResultFunc)handler;Parameter Name | Type | Description |
handler | handleBgmSelectResultFunc | Callback Block for returning the selected TAVBgmResource object to the SDK. |
voidoption specified types, return the result after the user completes selection via handler callback with the list of selected resources.-(void)getAlbumFilesForType:(TAVAlbumOptions *)option withHandler:(handleAlbumSelectResultFunc)handler;Parameter Name | Type | Description |
option | TAVAlbumOptions * | Album options specifying the file types to select (e.g., video, image). |
handler | handleAlbumSelectResultFunc | Callback Block for returning the selected TAVAlbumResource object list to the SDK. |
voidMethod | Description |
Whether a new track can be added. | |
Whether a new track can be added. | |
Whether a track can be split. |
-(BOOL)canAddNewTrack:(TAVTrackType)type count:(NSInteger)currentCount;Parameter Name | Type | Description |
type | TAVTrackType | The type of track to be added. |
currentCount | NSInteger | The current number of tracks of the same type already added. |
BOOL-(BOOL)canAddNewTrack:(TAVTrackType)type currentTime:(CMTime)currentTime duration:(CMTime)totalDuration;Parameter Name | Type | Description |
type | TAVTrackType | The type of track to be added. |
currentTime | CMTime | The current playback time position. |
totalDuration | CMTime | The total duration of the current editing project. |
BOOL-(BOOL)canSplitTrack:(TAVTrackType)type currentTime:(CMTime)currentTime timeRange:(CMTimeRange)timeRange;Parameter Name | Type | Description |
type | TAVTrackType | The type of track to be split. |
currentTime | CMTime | The current playback time position (split point). |
timeRange | CMTimeRange | The valid time range of the current track. |
BOOL피드백