I'm sending a MediaProtocolMessageStream.loadMedia command to my receiver. After a few seconds my session ends with a "network I/O timeout" with channel=SessionError.CATEGORY_DISCONNECT_CHANNEL and code=SessionError.CODE_TIMEOUT. This only happens for longer videos in the range of over 200 minutes so I'm assuming there's a legitimate timeout going on. Is there anyway to tweak the timeout time in a session so I can load larger movies? I see there's a final DEFAULT_TIMEOUT in the underlying NetworkRequest, but I have no way of accessing it.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Timeout value cannot be adjusted by application. It would help us to understand what is causing the timeout in your case. Timeout happens when either the sender does not reply to the receiver's ping requests in a timely manner, or when the sender has not received a ping from the receiver for a certain length of time. It might be the case that the media you are trying to load is tying up the CPU on the receiver so that it can't send its ping request to the sender. Do you see anything in the sender's log similar to "timeout waiting for ping" or so?