Added tracking/capturing/restoration of audio playback state and position.
This commit is contained in:
@@ -50,6 +50,17 @@ public partial class PlayingSongViewModel : ViewModelBase
|
||||
|
||||
_audioBitmapImageCache = audioBitmapImageCache;
|
||||
_dispatcherQueue = DispatcherQueue.GetForCurrentThread();
|
||||
|
||||
TryRestore();
|
||||
}
|
||||
|
||||
private void TryRestore()
|
||||
{
|
||||
if (_audioPlayer.PlayingSong is null)
|
||||
return;
|
||||
|
||||
Song = _audioPlayer.PlayingSong.Song;
|
||||
Task.Run(UpdateImage);
|
||||
}
|
||||
|
||||
private void OnAudioPlayerPlayingSongChanged(object? sender, PlayingSongChangedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user