onPositionChanged property

Stream<Duration> get onPositionChanged

Stream of changes on audio position.

Roughly fires every 200 milliseconds. Will continuously update the position of the playback if the status is PlayerState.playing.

You can use it on a progress bar, for instance.

Implementation

Stream<Duration> get onPositionChanged =>
    _positionUpdater?.positionStream ?? const Stream.empty();