AUdio Player Service refactor

This commit is contained in:
daniel-c-harvey
2025-09-08 14:20:38 -04:00
parent bf054f3d1b
commit a25d067dff
14 changed files with 323 additions and 158 deletions
@@ -0,0 +1,28 @@
using DeepDrftModels.Entities;
namespace DeepDrftWeb.Client.Services;
public interface IPlayerService
{
// State properties
bool IsInitialized { get; }
bool IsLoaded { get; }
bool IsPlaying { get; }
bool IsPaused { get; }
double CurrentTime { get; }
double? Duration { get; }
double Volume { get; }
double LoadProgress { get; }
string? ErrorMessage { get; }
// Events for UI updates
event Action? OnStateChanged;
// Control methods
Task SelectTrack(TrackEntity track);
Task Stop();
Task TogglePlayPause();
Task Seek(double position);
Task SetVolume(double volume);
void ClearError();
}