mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
adjust segment length for safari
This commit is contained in:
parent
36680906ff
commit
ec1f721a99
@ -1562,6 +1562,13 @@ namespace MediaBrowser.Api.Playback
|
|||||||
RequestedUrl = url
|
RequestedUrl = url
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if ((Request.UserAgent ?? string.Empty).IndexOf("iphone", StringComparison.OrdinalIgnoreCase) != -1 ||
|
||||||
|
(Request.UserAgent ?? string.Empty).IndexOf("ipad", StringComparison.OrdinalIgnoreCase) != -1 ||
|
||||||
|
(Request.UserAgent ?? string.Empty).IndexOf("ipod", StringComparison.OrdinalIgnoreCase) != -1)
|
||||||
|
{
|
||||||
|
state.SegmentLength = 6;
|
||||||
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(request.AudioCodec))
|
if (!string.IsNullOrWhiteSpace(request.AudioCodec))
|
||||||
{
|
{
|
||||||
state.SupportedAudioCodecs = request.AudioCodec.Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
|
state.SupportedAudioCodecs = request.AudioCodec.Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
|
||||||
|
@ -111,7 +111,8 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
await WaitForMinimumSegmentCount(playlist, 3, cancellationTokenSource.Token).ConfigureAwait(false);
|
var waitForSegments = state.SegmentLength >= 10 ? 2 : 3;
|
||||||
|
await WaitForMinimumSegmentCount(playlist, waitForSegments, cancellationTokenSource.Token).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
Loading…
x
Reference in New Issue
Block a user