mirror of https://github.com/jellyfin/jellyfin.git
Add PlaybackSpeed properties to state APIS
This commit is contained in:
parent
65f6c2e2fd
commit
7c46947df5
|
@ -11,6 +11,8 @@ namespace MediaBrowser.Model.Session
|
|||
/// </summary>
|
||||
public class PlaybackProgressInfo
|
||||
{
|
||||
private double _playbackSpeed = 1.0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance can seek.
|
||||
/// </summary>
|
||||
|
@ -110,5 +112,27 @@ namespace MediaBrowser.Model.Session
|
|||
public QueueItem[] NowPlayingQueue { 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
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Session
|
||||
{
|
||||
public class PlayerStateInfo
|
||||
{
|
||||
private double _playbackSpeed = 1.0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the now playing position ticks.
|
||||
/// </summary>
|
||||
|
@ -70,5 +74,27 @@ namespace MediaBrowser.Model.Session
|
|||
/// </summary>
|
||||
/// <value>The live stream identifier.</value>
|
||||
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 New Issue