Interface Class Name | Description |
TAVEditor | SDK operation entry class. |
// Add background music/// - Parameters:/// - bgmPath: File path of the music asset/// - startAtVideoTime: The time on the timeline when BGM starts playing (default is 0). For example, if the main track is a 10s video and you want BGM to start at the 5th second, pass the CMTime corresponding to 5s/// - timeRange: Playback range to trim from the music asset (default is the entire track). For example, if a song is 0-90s, you can set timeRange to trim any segment within 0-90s/// - return: Unique ID of the BGM asset- (int)addBgm:(NSString *)bgmPath startAtVideoTime:(CMTime)startAtVideoTime timeRange:(CMTimeRange)timeRange;
/// Remove background music by unique ID/// - Parameter bgmId: ID generated when adding background music- (BOOL)removeBgm:(int)bgmId;/// Remove all BGMs- (void)removeAllBgm;
/// Adjust the BGM start position in the video. This feature is not yet active/// - Parameters:/// - bgmId: ID generated when adding background music/// - startAtVideoTime: The time on the timeline when BGM starts playing. For example, if the main track is a 10s video and you want BGM to start at the 5th second, pass the CMTime corresponding to 5s- (void)updateBgm:(int)bgmId atVideoTime:(CMTime)startAtVideoTime;
/// Set BGM playback range/// - Parameters:/// - bgmId: ID generated when adding background music/// - timeRange: Playback range to trim from the music asset (default is the entire track). For example, if a song is 0-90s, you can set timeRange to trim any segment within 0-90s- (void)updateBgm:(int)bgmId playRange:(CMTimeRange)timeRange;
/// Set BGM playback volume/// - Parameters:/// - bgmId: ID generated when adding background music/// - volume: Volume (0-1f)- (void)setBgm:(int)bgmId volume:(float)volume;/// Set volume for all background music/// - Parameters:/// - volume: Volume (0-1f)- (void)setAllBgmVolume:(float)volume;/// Get BGM volume/// - Parameters:/// - bgmId: ID generated when adding background music/// - return: Volume- (float)getBgmVolume:(int)bgmId;
/// Adjust BGM playback speed/// - Parameters:/// - bgmId: ID generated when adding background music/// - speed: Playback speed. 1 = normal, >1 = fast, <1 = slow- (void)setBgm:(int)bgmId speed:(float)speed;/// Get BGM playback speed/// - Parameters:/// - bgmID: ID generated when adding background music/// - return: Current BGM playback speed- (float)getBgmSpeed:(int)bgmId;
フィードバック