diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index a36b65f74..0b8f21129 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -148,7 +148,6 @@ namespace MediaBrowser.Api.Playback
}
protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
- private readonly long _slowSeekTicks = TimeSpan.FromSeconds(0).Ticks;
///
/// Gets the fast seek command line parameter.
@@ -162,37 +161,12 @@ namespace MediaBrowser.Api.Playback
if (time > 0)
{
- if (time > _slowSeekTicks && EnableSlowSeek)
- {
- time -= _slowSeekTicks;
- }
-
return string.Format("-ss {0}", MediaEncoder.GetTimeParameter(time));
}
return string.Empty;
}
- protected string GetSlowSeekCommandLineParameter(StreamRequest request)
- {
- var time = request.StartTimeTicks ?? 0;
-
- if (time > _slowSeekTicks && _slowSeekTicks > 0)
- {
- return string.Format("-ss {0}", MediaEncoder.GetTimeParameter(time));
- }
-
- return string.Empty;
- }
-
- protected virtual bool EnableSlowSeek
- {
- get
- {
- return false;
- }
- }
-
///
/// Gets the map args.
///
diff --git a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
index a143da772..b2ffeca3d 100644
--- a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
@@ -134,7 +134,7 @@ namespace MediaBrowser.Api.Playback.Hls
var appendBaselineStream = false;
var baselineStreamBitrate = 64000;
- var hlsVideoRequest = state.VideoRequest as GetHlsVideoStream;
+ var hlsVideoRequest = state.VideoRequest as GetHlsVideoStreamLegacy;
if (hlsVideoRequest != null)
{
appendBaselineStream = hlsVideoRequest.AppendBaselineStream;
@@ -245,7 +245,7 @@ namespace MediaBrowser.Api.Playback.Hls
protected override string GetCommandLineArguments(string outputPath, StreamState state, bool isEncoding)
{
- var hlsVideoRequest = state.VideoRequest as GetHlsVideoStream;
+ var hlsVideoRequest = state.VideoRequest as GetHlsVideoStreamLegacy;
var itsOffsetMs = hlsVideoRequest == null
? 0
diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
index a2e327f7d..6774cc859 100644
--- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
@@ -30,27 +30,60 @@ namespace MediaBrowser.Api.Playback.Hls
///
[Route("/Videos/{Id}/master.m3u8", "GET", Summary = "Gets a video stream using HTTP live streaming.")]
[Route("/Videos/{Id}/master.m3u8", "HEAD", Summary = "Gets a video stream using HTTP live streaming.")]
- public class GetMasterHlsVideoStream : VideoStreamRequest
+ public class GetMasterHlsVideoPlaylist : VideoStreamRequest, IMasterHlsRequest
{
public bool EnableAdaptiveBitrateStreaming { get; set; }
- public GetMasterHlsVideoStream()
+ public GetMasterHlsVideoPlaylist()
{
EnableAdaptiveBitrateStreaming = true;
}
}
+ [Route("/Audio/{Id}/master.m3u8", "GET", Summary = "Gets an audio stream using HTTP live streaming.")]
+ [Route("/Audio/{Id}/master.m3u8", "HEAD", Summary = "Gets an audio stream using HTTP live streaming.")]
+ public class GetMasterHlsAudioPlaylist : StreamRequest, IMasterHlsRequest
+ {
+ public bool EnableAdaptiveBitrateStreaming { get; set; }
+
+ public GetMasterHlsAudioPlaylist()
+ {
+ EnableAdaptiveBitrateStreaming = true;
+ }
+ }
+
+ public interface IMasterHlsRequest
+ {
+ bool EnableAdaptiveBitrateStreaming { get; set; }
+ }
+
[Route("/Videos/{Id}/main.m3u8", "GET", Summary = "Gets a video stream using HTTP live streaming.")]
- public class GetMainHlsVideoStream : VideoStreamRequest
+ public class GetVariantHlsVideoPlaylist : VideoStreamRequest
+ {
+ }
+
+ [Route("/Audio/{Id}/main.m3u8", "GET", Summary = "Gets an audio stream using HTTP live streaming.")]
+ public class GetVariantHlsAudioPlaylist : StreamRequest
{
}
- ///
- /// Class GetHlsVideoSegment
- ///
[Route("/Videos/{Id}/hlsdynamic/{PlaylistId}/{SegmentId}.ts", "GET")]
[Api(Description = "Gets an Http live streaming segment file. Internal use only.")]
- public class GetDynamicHlsVideoSegment : VideoStreamRequest
+ public class GetHlsVideoSegment : VideoStreamRequest
+ {
+ public string PlaylistId { get; set; }
+
+ ///
+ /// Gets or sets the segment id.
+ ///
+ /// The segment id.
+ public string SegmentId { get; set; }
+ }
+
+ [Route("/Audio/{Id}/hlsdynamic/{PlaylistId}/{SegmentId}.aac", "GET")]
+ [Route("/Audio/{Id}/hlsdynamic/{PlaylistId}/{SegmentId}.ts", "GET")]
+ [Api(Description = "Gets an Http live streaming segment file. Internal use only.")]
+ public class GetHlsAudioSegment : StreamRequest
{
public string PlaylistId { get; set; }
@@ -71,27 +104,47 @@ namespace MediaBrowser.Api.Playback.Hls
protected INetworkManager NetworkManager { get; private set; }
- public Task