diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-03-17 16:25:15 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-17 16:25:15 -0400 |
| commit | 66a886adeffe40f41b1353d14fe8559ea134b83f (patch) | |
| tree | 30052119272e0778ec887e60458f1d4e779c9e8e /MediaBrowser.Api/Playback/StreamState.cs | |
| parent | 2928c753e24ae60024a63c8ea0d0b7f2b68a6383 (diff) | |
| parent | 3dcaeea20c3a7055dd8759e351d30c591ce1360d (diff) | |
Merge pull request #2532 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Api/Playback/StreamState.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/StreamState.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/MediaBrowser.Api/Playback/StreamState.cs b/MediaBrowser.Api/Playback/StreamState.cs index 912d60889..22a0fa7c9 100644 --- a/MediaBrowser.Api/Playback/StreamState.cs +++ b/MediaBrowser.Api/Playback/StreamState.cs @@ -60,6 +60,11 @@ namespace MediaBrowser.Api.Playback { get { + if (Request.SegmentLength.HasValue) + { + return Request.SegmentLength.Value; + } + if (string.Equals(OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase)) { var userAgent = UserAgent ?? string.Empty; @@ -86,6 +91,19 @@ namespace MediaBrowser.Api.Playback } } + public int MinSegments + { + get + { + if (Request.MinSegments.HasValue) + { + return Request.MinSegments.Value; + } + + return SegmentLength >= 10 ? 2 : 3; + } + } + public bool IsSegmentedLiveStream { get |
