Description:
When using AgoraRtcEngineKit in .liveBroadcasting channel profile with .broadcaster role, the SDK does not set
UIApplication.shared.isIdleTimerDisabled = true during active publishing.
This means the device screen dims and eventually locks mid-livestream, which interrupts the broadcast from the user's perspective. That's why screen went to power save mid-recording.
Expected behavior:
The SDK should automatically disable the idle timer when:
- The client role is .broadcaster
- The client has joined a channel and is actively publishing audio/video
And re-enable it when:
- The client leaves the channel
- The client stops publishing (mute both streams)
- The client role changes to .audience
Current behavior:
The idle timer is never managed by the SDK. The host app must manually toggle isIdleTimerDisabled, which is easy to miss and causes a poor user
experience when the screen locks during a live broadcast.
Workaround:
// When going live
UIApplication.shared.isIdleTimerDisabled = true
// When stopping
UIApplication.shared.isIdleTimerDisabled = false
Environment:
- Agora SDK: v4.6.0 (AgoraRtcKit)
- Platform: iOS 17+
- Channel profile: .liveBroadcasting
- Client role: .broadcaster
Additional context:
Other media SDKs (e.g. AVCaptureSession-based apps) commonly handle this automatically. Since Agora fully manages the camera/mic pipeline once
enableVideo()/enableAudio() are called, it would be consistent for the SDK to also manage screen sleep during active sessions. An opt-out flag
(e.g. AgoraRtcEngineConfig.manageIdleTimer) would preserve flexibility for apps that want custom behavior.
Description:
When using AgoraRtcEngineKit in .liveBroadcasting channel profile with .broadcaster role, the SDK does not set
UIApplication.shared.isIdleTimerDisabled = true during active publishing.
This means the device screen dims and eventually locks mid-livestream, which interrupts the broadcast from the user's perspective. That's why screen went to power save mid-recording.
Expected behavior:
The SDK should automatically disable the idle timer when:
And re-enable it when:
Current behavior:
The idle timer is never managed by the SDK. The host app must manually toggle isIdleTimerDisabled, which is easy to miss and causes a poor user
experience when the screen locks during a live broadcast.
Workaround:
// When going live
UIApplication.shared.isIdleTimerDisabled = true
// When stopping
UIApplication.shared.isIdleTimerDisabled = false
Environment:
Additional context:
Other media SDKs (e.g. AVCaptureSession-based apps) commonly handle this automatically. Since Agora fully manages the camera/mic pipeline once
enableVideo()/enableAudio() are called, it would be consistent for the SDK to also manage screen sleep during active sessions. An opt-out flag
(e.g. AgoraRtcEngineConfig.manageIdleTimer) would preserve flexibility for apps that want custom behavior.