onPositionChanged property

void Function(int positionMs, int timestampMs)? onPositionChanged
final

Reports the current playback position of the media resource.

While playing media files, the SDK automatically triggers this callback every second to report the current playback position.

  • positionMs Current playback position in milliseconds.
  • timestampMs NTP timestamp of the current playback position in milliseconds.

Implementation

final void Function(int positionMs, int timestampMs)? onPositionChanged;