setPosition method
@detail api
@brief Sets the start position of the audio effect file.
@param effectId Audio effect ID
@param position The starting playback position of the audio effect file in milliseconds.
You can get the total duration of the audio effect file by calling getDuration:{@link #ByteRTCAudioEffectPlayer#getDuration}, the value of position should be less than the total duration of the audio effect file.
@return
- 0: Success.
- < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details.
@note
- When playing online files, calling this API may cause a delay in playback.
- Call this API after start:filePath:config:{@link #ByteRTCAudioEffectPlayer#start:filePath:config}.
Implementation
FutureOr<int> setPosition(int effectId, int position) async {
return await nativeCall('setPosition:position:', [effectId, position]);
}