setPosition abstract method

Future<int?> setPosition(
  1. int position
)

Sets the starting playback position of the media file.

position: The starting position of the media file in milliseconds.
You can get the total duration of the media file through RTCMediaPlayer.getTotalDuration. The value of position should be less than the total duration of the media file.

Return value:

  • 0: Success.
  • <0: Failure.

Notes: When playing online files, calling this API may cause playback delay.

Implementation

Future<int?> setPosition(int position);