using System; using System.Threading.Tasks; using System.Threading; using Grpc.Core; using Aurora.Models.Media; namespace Aurora.Services.Player { public interface IPlayer { /// /// Event handler for changing playback states. /// event PlaybackStateChangedEventHandler PlaybackStateChanged; event MediaChangedEventHandler MediaChanged; /// /// The state of playback /// /// PlaybackState PlaybackState { get; } bool IsLoaded { get; } bool IsMediaLoaded(BaseMedia media); BaseMedia CurrentMedia { get; } float CurrentMediaPosition { get; } long CurrentMediaLength { get; } /// /// Load media into the media player. /// /// Media to load Task LoadMedia(BaseMedia media); /// /// Play currently loaded media. /// void Play(); /// /// Pause currently loaded media. /// void Pause(); /// /// Stop currently loaded media. /// void Stop(); void Enqueue(BaseMedia song); void Dequeue(BaseMedia song); } }