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 #IAudioEffectPlayer#getDuration}, the value of position should be less than the total duration of the audio effect file.
@return
- 0: Success.
- < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details.
@note
- When playing online files, calling this API may cause a delay in playback.
- Call this API after start{@link #IAudioEffectPlayer#start}.
Implementation
FutureOr<int> setPosition(int effectId, int position) async {
return await nativeCall('setPosition', [effectId, position]);
}