появляющийся плеер
This commit is contained in:
@@ -41,6 +41,8 @@ public class AudioPlayerService : IAudioPlayerService
|
||||
public string TotalTimeString => _totalTimeString;
|
||||
|
||||
public event Action? OnStateChanged;
|
||||
public event Action? OnStartedTrack;
|
||||
public event Action? OnEndedTrack;
|
||||
|
||||
public AudioPlayerService(TokenStorage tokenStorage, ISnackbar snackbar, HttpClient httpClient, PlayerStorage playerStorage)
|
||||
{
|
||||
@@ -105,6 +107,7 @@ public class AudioPlayerService : IAudioPlayerService
|
||||
_isPlaying = true;
|
||||
OnStateChanged?.Invoke();
|
||||
OnLoadAndPlayRequested?.Invoke(trackId, accessToken, playlistShareToken);
|
||||
OnStartedTrack?.Invoke();
|
||||
}
|
||||
|
||||
public async Task PlayAsync()
|
||||
@@ -112,6 +115,7 @@ public class AudioPlayerService : IAudioPlayerService
|
||||
_isPlaying = true;
|
||||
OnStateChanged?.Invoke();
|
||||
OnPlayRequested?.Invoke();
|
||||
OnStartedTrack?.Invoke();
|
||||
}
|
||||
|
||||
public async Task PauseAsync()
|
||||
@@ -175,6 +179,7 @@ public class AudioPlayerService : IAudioPlayerService
|
||||
_totalTime = 0;
|
||||
_currentTimeString = "0:00";
|
||||
OnStateChanged?.Invoke();
|
||||
OnEndedTrack?.Invoke();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user