Ensure there is an initial playback event and state

This commit is contained in:
Ryan Heise 2020-01-21 02:30:04 +11:00
parent ad88e986f3
commit 67bcd13739
2 changed files with 8 additions and 2 deletions

View File

@ -87,7 +87,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.4"
version: "0.0.6"
matcher:
dependency: transitive
description:

View File

@ -61,7 +61,13 @@ class AudioPlayer {
final _durationSubject = BehaviorSubject<Duration>();
AudioPlaybackEvent _audioPlaybackEvent;
// TODO: also broadcast this event on instantiation.
AudioPlaybackEvent _audioPlaybackEvent = AudioPlaybackEvent(
state: AudioPlaybackState.none,
updatePosition: Duration.zero,
updateTime: Duration.zero,
speed: 1.0,
);
Stream<AudioPlaybackEvent> _eventChannelStream;