此实现适用于较小的视频,但会导致较大的视频和音频文件出错。该应用程序提供2个流,音频/视频,根据收到的部分范围请求弹出chrome窗口,并尝试同步音频和视频。在大约7分钟后使用较大的视频,音频将产生以下错误。仅在视频或仅音频流播放时似乎不会出现这种情况。
2018-03-22 12:57:03.096, FINER, I/O Error during playback with parameters ,
HTTPresponse=HTTP/1.1 206
Date: Thu, 22 Mar 2018 10:55:01 GMT
Accept-Ranges: bytes
Content-Range: bytes 6913082-9044857/9044858
Content-Length: 2131776
Content-Type: audio/wav
, Content-Length=2131775}: java.util.concurrent.TimeoutException: Idle
timeout expired: 120001/120000 ms,
2018-03-22 12:57:03.097, I/O Error during playback with parameters
HTTPresponse=HTTP/1.1 206
Date: Thu, 22 Mar 2018 10:55:01 GMT
Accept-Ranges: bytes
Content-Range: bytes 6913082-9044857/9044858
Content-Length: 2131776
Content-Type: audio/wav
, Content-Length=2131775}: {1},
java.io.IOException: java.util.concurrent.TimeoutException:
Idle timeout expired: 120001/120000 ms
at
org.eclipse.jetty.util.SharedBlockingCallback$Blocker.block
(SharedBlockingCallback.java:219)
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:220)
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:496)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.write(Unknown Source)
答案 0 :(得分:1)
那个超时......
java.util.concurrent.TimeoutException: Idle timeout expired: 120001/120000 ms
at org.eclipse.jetty.util.SharedBlockingCallback$Blocker.block(SharedBlockingCallback.java:219)
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:220)
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:496)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.write(Unknown Source)
...表示浏览器没有从流中读取120,001毫秒(2分钟)并且连接已关闭。