From 2dac07bc3fa130021372eca223ed81ef695ec914 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 29 Aug 2013 21:42:34 -0400 Subject: [PATCH] add delay for remote buffering --- MediaBrowser.Api/Playback/BaseStreamingService.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 725f37bcaf..c9437b2c37 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -645,6 +645,18 @@ namespace MediaBrowser.Api.Playback { await Task.Delay(100).ConfigureAwait(false); } + + // Allow a small amount of time to buffer a little + if (state.Item is Video) + { + await Task.Delay(500).ConfigureAwait(false); + } + + // This is arbitrary, but add a little buffer time when internet streaming + if (state.Item.LocationType == LocationType.Remote) + { + await Task.Delay(2000).ConfigureAwait(false); + } } ///