dispositionStream method

Stream<PlaybackDisposition>? dispositionStream()

Provides a stream of dispositions which provide updated position and duration as the audio is played.

The duration may start out as zero until the media becomes available. The interval dictates the minimum interval between events being sent to the stream.

The minimum interval supported is 100ms.

Note: the underlying stream has a minimum frequency of 100ms so multiples of 100ms will give you the most consistent timing source.

Note: all calls to dispositionStream against this player will share a single interval which will controlled by the last call to this method.

If you pause the audio then no updates will be sent to the stream.

Implementation

Stream<PlaybackDisposition>? dispositionStream() {
  return _playerController != null ? _playerController!.stream : null;
}