WebRTC onicecandidate: Am getting ICE candidates with sdpMid=audio only but not for video

后端 未结 3 1822
臣服心动
臣服心动 2020-12-05 16:25

The browser used is Chrome... I have the caller and receiver code to generate SDP and ICE candidates. I get the caller code to generate proper SDP and ICE candidates with sd

3条回答
  •  日久生厌
    2020-12-05 16:55

    What you are dealing with is called bundeling. Offerer and answerer agree to bundle all ICE transports into a single ICE transport. Therefore you only get a single ICE candidate for the first m-section.

    The offerer is still giving you all these ICE candidates for the video m-section, because it does not know if the answerer is going to agree to use bundle.

    As AlexD points out in his answer you can influence this behavior on the offerer side via the "bundlePolicy". "maxBundle" as policy will for example result in the offerer assuming the answerer is going to understand bundleling and therefore only create ICE candidates for a single transport.

    But as long as the offerer is offering bundle the answerer is going to use it if it supports it.

提交回复
热议问题