client-sdk-swift icon indicating copy to clipboard operation
client-sdk-swift copied to clipboard

Co-streaming Video Freezes with presetH216_169 CameraCaptureOption for Front Camera and When Moving App to Background

Open isandeepj opened this issue 2 years ago • 5 comments

Describe the bug When using the presetH216_169 camera capture option with the front camera in co-streaming mode, the video freezes. The issue also arises when the co-streamer moves the application to the background and then brings it back to the foreground. However, when switching to the h360_169 setting, the video streams seamlessly

SDK Version

  • Livekit: 1.1.2
  • Livekit: 1.1.1
  • Livekit: 1.1.0

iOS Version

  • iOS 17
  • iOS 16.5

Steps to Reproduce

  1. Set up a co-streaming session using the presetH216_169 camera capture option for the front camera.
  2. Start the co-stream.
  3. Observe the freezing behavior of the video stream.
  4. Move the co-streamer app to the background and then bring it back to the foreground.
  5. Observe the video freezing behavior again.

Expected behavior The video should stream seamlessly without any freezes when using presetH216_169 and when transitioning the app between the foreground and background

Screenshots Screenshot 2023-09-21 at 7 22 57 PM Screenshot 2023-09-21 at 7 22 47 PM

Code Snippet

lazy var roomOptions: RoomOptions = {
    let cameraCaptureOptions = CameraCaptureOptions(position: .front, preferredFormat: nil, dimensions: VideoParameters.presetH216_169.dimensions, fps: VideoParameters.presetH216_169.encoding.maxFps)
    let options = RoomOptions(defaultCameraCaptureOptions: cameraCaptureOptions, adaptiveStream: false, dynacast: false)
    return options
}()

isandeepj avatar Sep 21 '23 13:09 isandeepj

Are you using E2EE ?

hiroshihorie avatar Sep 21 '23 14:09 hiroshihorie

No

isandeepj avatar Sep 21 '23 14:09 isandeepj

Was this working in earlier versions but started happening recently ?

hiroshihorie avatar Sep 21 '23 15:09 hiroshihorie

@hiroshihorie When using the presetH216_169 camera capture option with the front camera in co-streaming mode, the video freezes. The issue also arises when the co-streamer moves the application to the background and then brings it back to the foreground. However, when switching to the h360_169 setting, the video streams seamlessly

lazy var roomOptions: RoomOptions = {
    let cameraCaptureOptions = CameraCaptureOptions(position: .front, preferredFormat: nil, dimensions: VideoParameters.presetH216_169.dimensions, fps: VideoParameters.presetH216_169.encoding.maxFps)
    let options = RoomOptions(defaultCameraCaptureOptions: cameraCaptureOptions, adaptiveStream: false, dynacast: false)
    return options
}()

isandeepj avatar Sep 22 '23 05:09 isandeepj

@hiroshihorie any update on this?

isandeepj avatar Sep 26 '23 13:09 isandeepj