mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-06-29 10:23:36 +02:00
Add PlaybackSpeed properties to state APIS
This commit is contained in:
parent
65f6c2e2fd
commit
7c46947df5
|
@ -11,6 +11,8 @@ namespace MediaBrowser.Model.Session
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PlaybackProgressInfo
|
public class PlaybackProgressInfo
|
||||||
{
|
{
|
||||||
|
private double _playbackSpeed = 1.0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether this instance can seek.
|
/// Gets or sets a value indicating whether this instance can seek.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -110,5 +112,27 @@ namespace MediaBrowser.Model.Session
|
||||||
public QueueItem[] NowPlayingQueue { get; set; }
|
public QueueItem[] NowPlayingQueue { get; set; }
|
||||||
|
|
||||||
public string PlaylistItemId { get; set; }
|
public string PlaylistItemId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the playback speed.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The playback speed.</value>
|
||||||
|
public double PlaybackSpeed
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _playbackSpeed;
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value > 10 || value < 0.1)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("PlaybackSpeed must be between 0.1 and 10.0");
|
||||||
|
}
|
||||||
|
|
||||||
|
_playbackSpeed = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
#nullable disable
|
#nullable disable
|
||||||
#pragma warning disable CS1591
|
#pragma warning disable CS1591
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Session
|
namespace MediaBrowser.Model.Session
|
||||||
{
|
{
|
||||||
public class PlayerStateInfo
|
public class PlayerStateInfo
|
||||||
{
|
{
|
||||||
|
private double _playbackSpeed = 1.0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the now playing position ticks.
|
/// Gets or sets the now playing position ticks.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -70,5 +74,27 @@ namespace MediaBrowser.Model.Session
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The live stream identifier.</value>
|
/// <value>The live stream identifier.</value>
|
||||||
public string LiveStreamId { get; set; }
|
public string LiveStreamId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the playback speed.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The playback speed.</value>
|
||||||
|
public double PlaybackSpeed
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _playbackSpeed;
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value > 10 || value < 0.1)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("PlaybackSpeed must be between 0.1 and 10.0");
|
||||||
|
}
|
||||||
|
|
||||||
|
_playbackSpeed = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue