Is there a way to manually set the ApplicationSession network timeout for Android Chromecasting?

I am sending the MediaProtocolMessageStream.loadMedia command to my recipient. 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 more than 200 minutes, so I assume there will be a legitimate timeout. Is there anyway to set the timeout in the session so that I can upload larger movies? I see the final DEFAULT_TIMEOUT in the underlying NetworkRequest there, but I do not have access to it.

+4
source share
1 answer

The timeout value cannot be changed by the application. This will help us understand what causes a timeout in your case. A timeout occurs when either the sender does not respond to ping requests from the receiver in a timely manner, or when the sender has not received ping from the receiver for a certain period of time. It is possible that the media you are trying to load connects the processor to the receiver so that it cannot send its ping request to the sender. Do you see anything in the sender’s log looking like a “timeout waiting for ping” or something like that?

+1
source

All Articles