소스 검색

add delay for remote buffering

Luke Pulverenti 11 년 전
부모
커밋
2dac07bc3f
1개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 12 0
      MediaBrowser.Api/Playback/BaseStreamingService.cs

+ 12 - 0
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);
+            }
         }
 
         /// <summary>