Giter Club home page Giter Club logo

ios_webrtc_videochat's People

Contributors

grbaczek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

dankelley2

ios_webrtc_videochat's Issues

Poor resolution and framerate

Hello,

Firstly, thanks for this project!

After some tests with the demo project, I'm facing to a quality issue. After some seconds of video, the quality drops and some frames drop.
I've identified these logs :

(probe_controller.cc:346): Detected big bandwidth drop, start probing.
<...>
Dropping frame. Too large for target bitrate.

I've tested this project https://github.com/stasel/WebRTC-iOS with a local signaling server, and the video quality is great, with no resolution or fps issue. The weird thing is it seems to be the same WebRTC management, only the signaling server differs.

Have you any idea of which is the issue ?

Thanks
Best

Task from signalingClient.getRTCSessionDescriptions never returns from try await

When the following line of code:

if let rtcSessionDescription = try await signalingClient.getRTCSessionDescriptions(

does not get a session description from firebase (due to the host being the first one to connect) it never returns (firebase-ios-sdk 10.14.0). This never ending await causes the try await group.waitForAll() to also hang indefinitely even when a timeout occurs.

Is this an issue you've seen before? Unfortunately I can't run the repo and tests without some changes because I'm on the latest ios / xCode betas, and would like to identify whether or not this issue can be reproduced outside of my environment.

Changes I've made to run on IOS 17 beta:

  • Running Xcode 15 build 8
  • Moved WebRTC from a pod to a Package dependency
  • Updated firebase-ios-sdk to 10.14.0 for updated swift compatibility

Am able to successfully run a video / audio chat between an IOS 15.6 and an IOS 17 device, given that the host connects first, then the guest immediately connects within the timeout timeframe.

try await withThrowingTaskGroup(of: Void.self) { group in
    group.addTask {
        if let rtcSessionDescription = **try await signalingClient.getRTCSessionDescriptions**(
            currentPeer.watchKey,
            chatRoomId
        ).first(where: { _ in true }) {
            try await webRTCClient.set(remoteSdp: rtcSessionDescription)
            connectionStateContainer.info = "Remote SDP set"
            if currentPeer == .guest {
                let sdp = try await webRTCClient.answer()
                try await signalingClient.send(sdp: sdp, chatRoomId: chatRoomId, collection: currentPeer.sendKey)
                connectionStateContainer.info = "SDP answer sent"
            }
        }
    }
    if currentPeer == .host {
        group.addTask {
            let sdp = try await webRTCClient.offer()
            try await signalingClient.send(sdp: sdp, chatRoomId: chatRoomId, collection: currentPeer.sendKey)
            connectionStateContainer.info = "SDP offer sent"
        }
    }
    group.addTask {
        for _ in 1...40 {
            if webRTCClient.isRemoteDescriptionSet {
                return
            }
            try await Task.sleep(milliseconds: 100)
        }
        connectionStateContainer.info = "Connection timeout"
        throw connectionError.connectionTimeoutError
    }
    **try await group.waitForAll()**
}

Stun server No route to host with host

Hello,

I'm trying the sample project, but I'm facing with some issue after creating the room :

(stun_port.cc:604): UDP send of 20 bytes to host stun3.l.google.com:19302 (142.251.125.x:19302) failed with error 0 : [0x00000041] No route to host (stun_port.cc:604): UDP send of 20 bytes to host stun2.l.google.com:19302 (64.233.164.x:19302) failed with error 0 : [0x00000041] No route to host (stun_port.cc:604): UDP send of 20 bytes to host stun.l.google.com:19302 (173.194.76.x:19302) failed with error 0 : [0x00000041] No route to host (stun_port.cc:604): UDP send of 20 bytes to host stun4.l.google.com:19302 (74.125.27.x:19302) failed with error 0 : [0x00000041] No route to host (stun_port.cc:604): UDP send of 20 bytes to host stun1.l.google.com:19302 (142.251.27.x:19302) failed with error 0 : [0x00000041] No route to host (stun_port.cc:604): UDP send of 20 bytes to host stun.l.google.com:19302 (173.194.76.x:19302) failed with error 0 : [0x00000041] No route to host (stun_port.cc:604): UDP send of 20 bytes to host stun2.l.google.com:19302 (64.233.164.x:19302) failed with error 0 : [0x00000041] No route to host (stun_port.cc:604): UDP send of 20 bytes to host stun1.l.google.com:19302 (142.251.27.x:19302) failed with error 0 : [0x00000041] No route to host (stun_port.cc:604): UDP send of 20 bytes to host stun4.l.google.com:19302 (74.125.27.x:19302) failed with error 0 : [0x00000041] No route to host (stun_port.cc:604): UDP send of 20 bytes to host stun3.l.google.com:19302 (142.251.125.x:19302) failed with error 0 : [0x00000041] No route to host

The room is well created in Firebase, "SDP offer sent" is well displayed on the screen. But after some seconds "Connection timeout" is displayed. It looks like the stun servers are not available ? Or maybe I don't understand the WebRTC step?

Tested on wifi or LTE network and no VPN

In any case thanks for this very well-explained repository which allows us to understand webrtc well! :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.