65 lines
1.4 KiB
C#
65 lines
1.4 KiB
C#
|
using System;
|
||
|
using System.Threading.Tasks;
|
||
|
using System.Threading;
|
||
|
using Grpc.Core;
|
||
|
using Aurora.Models.Media;
|
||
|
using Aurora.Proto.Sync;
|
||
|
using LibVLCSharp.Shared;
|
||
|
|
||
|
namespace Aurora.Services.Player
|
||
|
{
|
||
|
|
||
|
public interface IPlayer
|
||
|
{
|
||
|
|
||
|
/// <summary>
|
||
|
/// Event handler for changing playback states.
|
||
|
/// </summary>
|
||
|
event PlaybackStateChangedEventHandler PlaybackStateChanged;
|
||
|
|
||
|
event MediaChangedEventHandler MediaChanged;
|
||
|
|
||
|
/// <summary>
|
||
|
/// The state of playback
|
||
|
/// </summary>
|
||
|
/// <value></value>
|
||
|
PlaybackState PlaybackState { get; }
|
||
|
|
||
|
bool IsLoaded { get; }
|
||
|
|
||
|
bool IsMediaLoaded(BaseMedia media);
|
||
|
|
||
|
BaseMedia CurrentMedia { get; }
|
||
|
|
||
|
float CurrentMediaPosition { get; }
|
||
|
|
||
|
long CurrentMediaLength { get; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Load media into the media player.
|
||
|
/// </summary>
|
||
|
/// <param name="media">Media to load</param>
|
||
|
Task LoadMedia(BaseMedia media);
|
||
|
|
||
|
/// <summary>
|
||
|
/// Play currently loaded media.
|
||
|
/// </summary>
|
||
|
void Play();
|
||
|
|
||
|
/// <summary>
|
||
|
/// Pause currently loaded media.
|
||
|
/// </summary>
|
||
|
void Pause();
|
||
|
|
||
|
/// <summary>
|
||
|
/// Stop currently loaded media.
|
||
|
/// </summary>
|
||
|
void Stop();
|
||
|
|
||
|
void Enqueue(BaseMedia song);
|
||
|
|
||
|
void Dequeue(BaseMedia song);
|
||
|
|
||
|
}
|
||
|
}
|