onProgress.

The τ Player API


onProgress

The stream side of the Food Controller : this is a stream on which FlutterSound will post the player progression. You may listen to this Stream to have feedback on the current playback.

PlaybackDisposition has two fields :

  • Duration duration (the total playback duration)
  • Duration position (the current playback position)

Example:

        myPlayer.setSubscriptionDuration(Duration(milliseconds: 100));
        _playerSubscription = myPlayer.onProgress.listen((e)
        {
                Duration maxDuration = e.duration;
                Duration position = e.position;
                ...
        }
        Lorem ipsum ...

Tags: api player