Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network Error State Not Triggered During Live Stream #736

Open
JulienDev opened this issue Feb 21, 2024 · 10 comments
Open

Network Error State Not Triggered During Live Stream #736

JulienDev opened this issue Feb 21, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@JulienDev
Copy link

Describe the bug
While testing network error handling on my Apple TV, I noticed that network errors (like disconnecting the internet) don't trigger expected error states or callbacks. After starting a live stream and then disconnecting the internet from my router, the Apple TV's state remains on buffering instead of changing to an error state. Additionally, the onFinish callback, which I expected to handle the error, is never called.

To Reproduce

  1. Start a live stream on Apple TV.
  2. After a few minutes, disconnect the internet connection for the Apple TV from the router.
  3. Wait and observe the behavior of the live stream.

Expected behavior
The state changes to an error to reflect the lost connection.
The onFinish callback is triggered to handle the error.
Actual Outcome:

Actual behavior
The state stays at buffering and doesn't change to an error state.
The onFinish callback is not called at all.

Question
Is there a different method to detect network errors in this scenario?

Platform (please complete the following information):

  • Device: TvOS
  • OS: 17.2
@JulienDev JulienDev added the bug Something isn't working label Feb 21, 2024
@kingslay
Copy link
Owner

因为我内部有加了网络错误自动重试的逻辑。所以没有回调onFinish方法。

@JulienDev
Copy link
Author

Ah, okay. But when the internet connection is restored, streaming playback doesn't resume on my end. Is there a way to disable automatic retries so I can handle errors manually?

@kingslay
Copy link
Owner

是有开关可以把自动重试关掉的。但是这边还有一个问题点是: 为什么网络恢复了,不能继续播放。这个很奇怪。你的直播网络中断了多久呢?

@JulienDev
Copy link
Author

I think I restored the connection after 2-3 minutes

@kingslay
Copy link
Owner

那你可以试下只中断30秒到70s。看下是不是能够恢复播放。看下是不是中断太久造成的。

@JulienDev
Copy link
Author

After re-enabling the internet connection just a few seconds later, the video playback does not resume and remains halted.

@kingslay
Copy link
Owner

你可以看下TracyPlayer 会不会有这个问题

@JulienDev
Copy link
Author

Same with TracyPlayer, even after re-enabling the internet connection, video playback never resume

@kingslay
Copy link
Owner

我这边试了下。我的app应该在网络断开一会儿之后 就可以显示播放失败。然后网络恢复之后 点播放按钮就可以继续播放了

@JulienDev
Copy link
Author

On my Apple TV TracyPlayer is only showing a loader forever (tried for around 30 minutes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants