onProgress.
The τ Player API
onProgress
- Dart 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)
Important: Be aware that you must call the verb setSubscriptionDuration() to
specify the frequency of this callback. By default, this frequency is 0 (the callback is never fired)
Example:
myPlayer.setSubscriptionDuration(Duration(milliseconds: 100)); _playerSubscription = myPlayer.onProgress.listen((e) { Duration maxDuration = e.duration; Duration position = e.position; ... }
Lorem ipsum ...