setProgressInterval method
@detail api
@brief Set the interval of the periodic callback onMediaPlayerPlayingProgress:progress:{@link #ByteRTCMediaPlayerEventHandler#onMediaPlayerPlayingProgress:progress} during audio mixing.
@param interval interval in ms.
- interval > 0: The callback is enabled. The actual interval is a multiple of 10. If the input value is not divisible by 10, it will be automatically rounded up. For example, if the input is 52, the actual interval will be 60 milliseconds.
- interval <= 0: The callback is disabled.
@return
- 0: Success.
- < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details.
@note
- Call this API only when audio is mixing.
- This API is valid for audio file, not PCM data.
Implementation
FutureOr<int> setProgressInterval(int64_t interval) async {
return await nativeCall('setProgressInterval:', [interval]);
}