You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We started seeing some high video start times (~10 seconds) in our live stream app. After some investigation we found out the problem was that due to some problem in their network, the request to the SNTP server to resolve the time offset was timing out, and this exception was thrown:
Failed to resolve time offset.
java.net.SocketTimeoutException: Poll timed out
at libcore.io.IoBridge.poll(IoBridge.java:682)
at java.net.PlainDatagramSocketImpl.doRecv(PlainDatagramSocketImpl.java:150)
at java.net.PlainDatagramSocketImpl.receive0(PlainDatagramSocketImpl.java:141)
at java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:164)
at java.net.DatagramSocket.receive(DatagramSocket.java:847)
at androidx.media3.exoplayer.util.SntpClient.loadNtpTimeOffsetMs(SntpClient.java:185)
at androidx.media3.exoplayer.util.SntpClient.access$400(SntpClient.java:41)
at androidx.media3.exoplayer.util.SntpClient$NtpTimeLoadable.load(SntpClient.java:300)
at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:421)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
After some digging, we found out the problem was due to the client could not reach the sntp server (time.android.com) with IPv6.
Changing the server to one without IPv6, or disabling IPv6 on the client network would solve the problem.
Proposed solution
It would be great if exoplayer allowed to change the timeout of the sntp request, because the default, 10 seconds, seems to high for a non critical request.
It would also be nice if the exoplayer SNTP client would follow the protocol and attempt the alternative ipAddresses in case of failure, which would also solve the problem we we're having due to IPv6 connectivity problems.
Thanks in advance for your support
Best regards
The text was updated successfully, but these errors were encountered:
Added a method to set the timeout for the SNTP request.
Also changed the default timeout to 5s instead of 10s as it seemed quite high.
Issue: #1540
PiperOrigin-RevId: 652566008
[REQUIRED] Use case description
We started seeing some high video start times (~10 seconds) in our live stream app. After some investigation we found out the problem was that due to some problem in their network, the request to the SNTP server to resolve the time offset was timing out, and this exception was thrown:
After some digging, we found out the problem was due to the client could not reach the sntp server (time.android.com) with IPv6.
Changing the server to one without IPv6, or disabling IPv6 on the client network would solve the problem.
Proposed solution
It would be great if exoplayer allowed to change the timeout of the sntp request, because the default, 10 seconds, seems to high for a non critical request.
It would also be nice if the exoplayer SNTP client would follow the protocol and attempt the alternative ipAddresses in case of failure, which would also solve the problem we we're having due to IPv6 connectivity problems.
Thanks in advance for your support
Best regards
The text was updated successfully, but these errors were encountered: