add hls abs setting

This commit is contained in:
Luke Pulverenti 2014-07-31 22:58:37 -04:00
parent 3fa2a001c7
commit a5c7e91620
6 changed files with 27 additions and 6 deletions

View File

@ -22,6 +22,12 @@ namespace MediaBrowser.Api.Playback.Hls
[Api(Description = "Gets a video stream using HTTP live streaming.")]
public class GetMasterHlsVideoStream : VideoStreamRequest
{
public bool EnableAdaptiveBitrateStreaming { get; set; }
public GetMasterHlsVideoStream()
{
EnableAdaptiveBitrateStreaming = true;
}
}
[Route("/Videos/{Id}/main.m3u8", "GET")]
@ -375,6 +381,13 @@ namespace MediaBrowser.Api.Playback.Hls
private bool EnableAdaptiveBitrateStreaming(StreamState state)
{
var request = state.Request as GetMasterHlsVideoStream;
if (request != null && !request.EnableAdaptiveBitrateStreaming)
{
return false;
}
if (string.IsNullOrWhiteSpace(state.MediaPath))
{
// Opening live streams is so slow it's not even worth it

View File

@ -286,6 +286,14 @@ namespace MediaBrowser.Model.ApiClient
/// <exception cref="ArgumentNullException">query</exception>
Task<ItemsResult> GetItemsAsync(ItemQuery query, CancellationToken cancellationToken);
/// <summary>
/// Gets the user views.
/// </summary>
/// <param name="userId">The user identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;ItemsResult&gt;.</returns>
Task<ItemsResult> GetUserViews(string userId, CancellationToken cancellationToken);
/// <summary>
/// Gets the instant mix from song async.
/// </summary>

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common.Internal</id>
<version>3.0.421</version>
<version>3.0.422</version>
<title>MediaBrowser.Common.Internal</title>
<authors>Luke</authors>
<owners>ebr,Luke,scottisafool</owners>
@ -12,7 +12,7 @@
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
<dependency id="MediaBrowser.Common" version="3.0.421" />
<dependency id="MediaBrowser.Common" version="3.0.422" />
<dependency id="NLog" version="3.1.0.0" />
<dependency id="SimpleInjector" version="2.5.2" />
<dependency id="sharpcompress" version="0.10.2" />

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common</id>
<version>3.0.421</version>
<version>3.0.422</version>
<title>MediaBrowser.Common</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Model.Signed</id>
<version>3.0.421</version>
<version>3.0.422</version>
<title>MediaBrowser.Model - Signed Edition</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>MediaBrowser.Server.Core</id>
<version>3.0.421</version>
<version>3.0.422</version>
<title>Media Browser.Server.Core</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>
@ -12,7 +12,7 @@
<description>Contains core components required to build plugins for Media Browser Server.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
<dependency id="MediaBrowser.Common" version="3.0.421" />
<dependency id="MediaBrowser.Common" version="3.0.422" />
</dependencies>
</metadata>
<files>