adjust segment length

This commit is contained in:
Luke Pulverenti 2016-06-30 17:26:43 -04:00
parent bf0dd0d8ae
commit 68df03b872
2 changed files with 11 additions and 3 deletions

View File

@ -1645,7 +1645,8 @@ namespace MediaBrowser.Api.Playback
var state = new StreamState(MediaSourceManager, Logger)
{
Request = request,
RequestedUrl = url
RequestedUrl = url,
UserAgent = Request.UserAgent
};
//if ((Request.UserAgent ?? string.Empty).IndexOf("iphone", StringComparison.OrdinalIgnoreCase) != -1 ||

View File

@ -74,10 +74,16 @@ namespace MediaBrowser.Api.Playback
get
{
if (string.Equals(OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase))
{
var userAgent = UserAgent ?? string.Empty;
if (userAgent.IndexOf("AppleTV", StringComparison.OrdinalIgnoreCase) != -1)
{
return 10;
}
return 6;
}
return 3;
}
}
@ -99,6 +105,7 @@ namespace MediaBrowser.Api.Playback
public string OutputVideoSync = "-1";
public List<string> SupportedAudioCodecs { get; set; }
public string UserAgent { get; set; }
public StreamState(IMediaSourceManager mediaSourceManager, ILogger logger)
{