mucke/lib/domain/entities/playback_event.dart

33 lines
659 B
Dart
Raw Normal View History

2020-12-20 16:21:48 +01:00
class PlaybackEvent {
PlaybackEvent({
this.duration,
this.index,
this.processingState,
this.updatePosition,
this.updateTime,
});
2020-12-13 12:37:08 +01:00
2020-12-20 16:21:48 +01:00
final Duration duration;
final int index;
2020-12-13 12:37:08 +01:00
final ProcessingState processingState;
2020-12-20 16:21:48 +01:00
final Duration updatePosition;
final DateTime updateTime;
2020-12-13 12:37:08 +01:00
}
enum ProcessingState {
/// The player has not loaded an [AudioSource].
none,
2020-12-20 16:21:48 +01:00
2020-12-13 12:37:08 +01:00
/// The player is loading an [AudioSource].
loading,
2020-12-20 16:21:48 +01:00
2020-12-13 12:37:08 +01:00
/// The player is buffering audio and unable to play.
buffering,
2020-12-20 16:21:48 +01:00
2020-12-13 12:37:08 +01:00
/// The player is has enough audio buffered and is able to play.
ready,
2020-12-20 16:21:48 +01:00
2020-12-13 12:37:08 +01:00
/// The player has reached the end of the audio.
completed,
2020-12-20 16:21:48 +01:00
}