Restore old behaviour where events emitted on playing state changes.
This commit is contained in:
parent
05a7b768b3
commit
850dca088d
|
@ -541,7 +541,6 @@ class AudioPlayer {
|
||||||
_InitialSeekValues(position: initialPosition, index: initialIndex);
|
_InitialSeekValues(position: initialPosition, index: initialIndex);
|
||||||
_playbackEventSubject.add(_playbackEvent = PlaybackEvent(
|
_playbackEventSubject.add(_playbackEvent = PlaybackEvent(
|
||||||
currentIndex: initialIndex, updatePosition: initialPosition));
|
currentIndex: initialIndex, updatePosition: initialPosition));
|
||||||
_broadcastSequence();
|
|
||||||
_audioSource = source;
|
_audioSource = source;
|
||||||
_broadcastSequence();
|
_broadcastSequence();
|
||||||
Duration duration;
|
Duration duration;
|
||||||
|
@ -689,6 +688,7 @@ class AudioPlayer {
|
||||||
updateTime: DateTime.now(),
|
updateTime: DateTime.now(),
|
||||||
);
|
);
|
||||||
_playingSubject.add(true);
|
_playingSubject.add(true);
|
||||||
|
_playbackEventSubject.add(_playbackEvent);
|
||||||
final playCompleter = Completer();
|
final playCompleter = Completer();
|
||||||
final audioSession = await AudioSession.instance;
|
final audioSession = await AudioSession.instance;
|
||||||
if (await audioSession.setActive(true)) {
|
if (await audioSession.setActive(true)) {
|
||||||
|
|
Loading…
Reference in New Issue