BufferGroupRequest.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using System.Threading;
  3. using MediaBrowser.Controller.Session;
  4. using MediaBrowser.Model.SyncPlay;
  5. namespace MediaBrowser.Controller.SyncPlay
  6. {
  7. /// <summary>
  8. /// Class BufferGroupRequest.
  9. /// </summary>
  10. public class BufferGroupRequest : IGroupPlaybackRequest
  11. {
  12. /// <summary>
  13. /// Gets or sets when the request has been made by the client.
  14. /// </summary>
  15. /// <value>The date of the request.</value>
  16. public DateTime When { get; set; }
  17. /// <summary>
  18. /// Gets or sets the position ticks.
  19. /// </summary>
  20. /// <value>The position ticks.</value>
  21. public long PositionTicks { get; set; }
  22. /// <summary>
  23. /// Gets or sets a value indicating whether the client playback is unpaused.
  24. /// </summary>
  25. /// <value>The client playback status.</value>
  26. public bool IsPlaying { get; set; }
  27. /// <summary>
  28. /// Gets or sets the playlist item identifier of the playing item.
  29. /// </summary>
  30. /// <value>The playlist item identifier.</value>
  31. public string PlaylistItemId { get; set; }
  32. /// <inheritdoc />
  33. public PlaybackRequestType Type { get; } = PlaybackRequestType.Buffer;
  34. /// <inheritdoc />
  35. public void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
  36. {
  37. state.HandleRequest(context, state.Type, this, session, cancellationToken);
  38. }
  39. }
  40. }