WebRTC-iOS icon indicating copy to clipboard operation
WebRTC-iOS copied to clipboard

iPhone 11 pro videocall freezes

Open francescodalsavio opened this issue 5 years ago • 2 comments

I noticed that with the iPhone 11 pro the video freezes after about 15 seconds while with an iPhone 7 everything works fine.

Lowering the quality of the video call in WebRTCClient.swift instead it also works well on the iPhone 11 pro.

the change i made is change:

        let format = (RTCCameraVideoCapturer.supportedFormats(for: frontCamera).sorted { (f1, f2) -> Bool in
            let width1 = CMVideoFormatDescriptionGetDimensions(f1.formatDescription).width
            let width2 = CMVideoFormatDescriptionGetDimensions(f2.formatDescription).width
            return width1 < width2
        }).**last**,

whit:

        let format = (RTCCameraVideoCapturer.supportedFormats(for: frontCamera).sorted { (f1, f2) -> Bool in
            let width1 = CMVideoFormatDescriptionGetDimensions(f1.formatDescription).width
            let width2 = CMVideoFormatDescriptionGetDimensions(f2.formatDescription).width
            return width1 < width2
        }).**first**,

francescodalsavio avatar Mar 15 '20 13:03 francescodalsavio

Hey thanks for the input. there is already a similar issue with similar solution.

I think changing last to first will select the lowest resolution. Would it hurt the picture quality? Can you check and compare?

stasel avatar Mar 16 '20 18:03 stasel

Yes, the image quality deteriorates, surely with a little work you can understand what causes this bug and then solve it. If I had to find the solution, I'll post it here.

francescodalsavio avatar Mar 16 '20 18:03 francescodalsavio