diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs
index 2e9323e03..7c655ef88 100644
--- a/MediaBrowser.Api/ApiEntryPoint.cs
+++ b/MediaBrowser.Api/ApiEntryPoint.cs
@@ -580,6 +580,10 @@ namespace MediaBrowser.Api
///
/// The HLS
///
- Hls
+ Hls,
+ ///
+ /// The dash
+ ///
+ Dash
}
}
diff --git a/MediaBrowser.Api/MediaBrowser.Api.csproj b/MediaBrowser.Api/MediaBrowser.Api.csproj
index 732d602c6..df9569e28 100644
--- a/MediaBrowser.Api/MediaBrowser.Api.csproj
+++ b/MediaBrowser.Api/MediaBrowser.Api.csproj
@@ -75,6 +75,7 @@
+
diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
index b99657c30..aa28ee90a 100644
--- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
@@ -695,13 +695,5 @@ namespace MediaBrowser.Api.Playback.Hls
{
return ".ts";
}
-
- protected override TranscodingJobType TranscodingJobType
- {
- get
- {
- return TranscodingJobType.Hls;
- }
- }
}
}
diff --git a/MediaBrowser.Api/Playback/Hls/MpegDashService.cs b/MediaBrowser.Api/Playback/Hls/MpegDashService.cs
new file mode 100644
index 000000000..caddbd9a1
--- /dev/null
+++ b/MediaBrowser.Api/Playback/Hls/MpegDashService.cs
@@ -0,0 +1,271 @@
+using MediaBrowser.Common.IO;
+using MediaBrowser.Common.Net;
+using MediaBrowser.Controller.Channels;
+using MediaBrowser.Controller.Configuration;
+using MediaBrowser.Controller.Dlna;
+using MediaBrowser.Controller.Library;
+using MediaBrowser.Controller.LiveTv;
+using MediaBrowser.Controller.MediaEncoding;
+using MediaBrowser.Model.IO;
+using ServiceStack;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace MediaBrowser.Api.Playback.Hls
+{
+ ///
+ /// Options is needed for chromecast. Threw Head in there since it's related
+ ///
+ [Route("/Videos/{Id}/master.mpd", "GET", Summary = "Gets a video stream using Mpeg dash.")]
+ [Route("/Videos/{Id}/master.mpd", "HEAD", Summary = "Gets a video stream using Mpeg dash.")]
+ public class GetMasterManifest : VideoStreamRequest
+ {
+ public bool EnableAdaptiveBitrateStreaming { get; set; }
+
+ public GetMasterManifest()
+ {
+ EnableAdaptiveBitrateStreaming = true;
+ }
+ }
+
+ [Route("/Videos/{Id}/dash/{SegmentId}.ts", "GET")]
+ public class GetDashSegment : VideoStreamRequest
+ {
+ ///
+ /// Gets or sets the segment id.
+ ///
+ /// The segment id.
+ public string SegmentId { get; set; }
+ }
+
+ public class MpegDashService : BaseHlsService
+ {
+ protected INetworkManager NetworkManager { get; private set; }
+
+ public MpegDashService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, ILiveTvManager liveTvManager, IDlnaManager dlnaManager, IChannelManager channelManager, ISubtitleEncoder subtitleEncoder, INetworkManager networkManager)
+ : base(serverConfig, userManager, libraryManager, isoManager, mediaEncoder, fileSystem, liveTvManager, dlnaManager, channelManager, subtitleEncoder)
+ {
+ NetworkManager = networkManager;
+ }
+
+ public object Get(GetMasterManifest request)
+ {
+ var result = GetAsync(request, "GET").Result;
+
+ return result;
+ }
+
+ public object Head(GetMasterManifest request)
+ {
+ var result = GetAsync(request, "HEAD").Result;
+
+ return result;
+ }
+
+ private async Task