-
Notifications
You must be signed in to change notification settings - Fork 104
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
Screen Broadcast Stops Unexpectedly After short time when app is in background #510
Comments
I found that setting background processing in background modes eliminates error:
The first problem I encountered was before I updated the description. The current description is now accurate. |
Unfortunately, despite of added background modes aforementioned error still occurs:
|
iOS background mode isn't automatic, you'll need to ensure you have something to keep it active in the background. For voip background mode, you should use CallKit to ensure the app stays active throughout the call session. |
UPDATED
Describe the bug
The screen broadcasting session on iOS/iPadOS automatically stops after a short period (typically between 30 seconds and 5 minutes) when the main app is moved to the background. This issue is consistently reproducible in production environments. However, when running the app with an attached debugger, the broadcasting session does not stop because the app does not enter the suspended state.
It appears that the broadcast extension functions correctly and attempts to send frames while the main app is in the background. However, the system automatically transitions the main app to a suspended state, causing the broadcast extension to stop working.
In the production build, the system automatically terminates the broadcasting session. System logs indicate that the app transitions to the suspended state, at which point the broadcasting stops:
The issue persists across versions 2.0.4, 2.0.15, and 2.0.17. Previously, the broadcasting feature worked correctly without this problem what is weird. Moreover, when the session is running while the main app is in the foreground, it can continue working all day without interruption.
SDK Version
iOS Version
Xcode Version
Steps to Reproduce
0a. Launch app without debbuger connected.
0b. When running with an attached debugger, observe the error logs in Console.app.
5a. The broadcast stops automatically.
5b. Logs in Console.app occurs, broadcast status seams as continued but it is not.
Expected Behavior
The screen broadcast session should continue without interruption, as it did in previous SDK and iOS versions, without stopping after short time.
Screenshots
Project settings:
Logs
logs.txt
Example project with reproduction
RemoteAccess_for_Livekit.zip
Please advise if there are any known workarounds or fixes for this issue.
The text was updated successfully, but these errors were encountered: