diff --git a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs
index a6e7efcb0c..5c75ab2c68 100644
--- a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs
+++ b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs
@@ -11,6 +11,8 @@ namespace MediaBrowser.Model.Session
///
public class PlaybackProgressInfo
{
+ private double _playbackSpeed = 1.0;
+
///
/// Gets or sets a value indicating whether this instance can seek.
///
@@ -110,5 +112,27 @@ namespace MediaBrowser.Model.Session
public QueueItem[] NowPlayingQueue { get; set; }
public string PlaylistItemId { get; set; }
+
+ ///
+ /// Gets or sets the playback speed.
+ ///
+ /// The playback speed.
+ 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;
+ }
+ }
}
}
diff --git a/MediaBrowser.Model/Session/PlayerStateInfo.cs b/MediaBrowser.Model/Session/PlayerStateInfo.cs
index 80e6d4e0b0..0caf731cc2 100644
--- a/MediaBrowser.Model/Session/PlayerStateInfo.cs
+++ b/MediaBrowser.Model/Session/PlayerStateInfo.cs
@@ -1,10 +1,14 @@
#nullable disable
#pragma warning disable CS1591
+using System;
+
namespace MediaBrowser.Model.Session
{
public class PlayerStateInfo
{
+ private double _playbackSpeed = 1.0;
+
///
/// Gets or sets the now playing position ticks.
///
@@ -70,5 +74,27 @@ namespace MediaBrowser.Model.Session
///
/// The live stream identifier.
public string LiveStreamId { get; set; }
+
+ ///
+ /// Gets or sets the playback speed.
+ ///
+ /// The playback speed.
+ 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;
+ }
+ }
}
}