Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
1136 Discussions

How to enable(or use) RTCConfiguration in iOS SDK?

zhang_s_1
Beginner
220 Views
The Documents for iOS SDK didn't show how to use RTCConfiguration. I used it as the code below, no effect. What's the right usage for RTCConfiguration ?

I want to change the configuration for ICE. The interfaces of the RTCPeerClientConfiguration for ICE has only one(candidateNetworkPolicy).
How to use RTCConfiguration in iOS SDK ?   3x!

iOS SDK Intel 官方文档只是给出了类说明,没有说明怎么使用。我使用了如下代码配置RTCConfiguration,好像没有起作用。正确使用方法应该是怎么样的?多谢指点!!
- (RTCPeerClient*)peerClient{
  if (_peerClient==nil){
    id<RTCP2PSignalingChannelProtocol> scc=[[SocketSignalingChannel alloc]init];
    RTCConfiguration* globalRTCconfig = [[RTCConfiguration alloc] init];
    globalRTCconfig.tcpCandidatePolicy = RTCTcpCandidatePolicyDisabled;
    globalRTCconfig.bundlePolicy = RTCBundlePolicyMaxBundle;
    globalRTCconfig.rtcpMuxPolicy = RTCRtcpMuxPolicyRequire;
    RTCPeerClientConfiguration* config=[[RTCPeerClientConfiguration alloc]init];

    NSArray *ice=[[NSArray alloc]initWithObjects:[[RTCIceServer alloc]initWithURLStrings:[[NSArray alloc]initWithObjects:@"turn:x.x.x.x?transport=udp", nil] username:@"xx" credential:@"xx"], nil];
    config.ICEServers=ice;
    config.mediaCodec.videoCodec=VideoCodecH264;
    config.candidateNetworkPolicy=RTCCandidateNetworkPolicyAll;
    _peerClient=[[RTCPeerClient alloc]initWithConfiguration:config signalingChannel:scc];
    [_peerClient addObserver:self];
  }
  return _peerClient;
}

 

0 Kudos
4 Replies
zhang_s_1
Beginner
220 Views

I want to change the configuration for ICE. The interfaces of the RTCPeerClientConfiguration for ICE has only one(candidateNetworkPolicy).
How to use RTCConfiguration in iOS SDK ?   3x!

Jianjun_Z_Intel
Employee
220 Views

Hi Zhang,

Setting RTCConfiguration is not supported at this time. Only items in RTCPeerClientConfiguration work.

zhang_s_1
Beginner
220 Views

Jianjun Z. (Intel) wrote:

Hi Zhang,

Setting RTCConfiguration is not supported at this time. Only items in RTCPeerClientConfiguration work.

I tested the demo(although I setted “config.candidateNetworkPolicy=RTCCandidateNetworkPolicyAll;), RTCPeerClientConfiguration can't deal with networks changing case. During the call, the network switch(eg.wifi-->4G) will cause the call interrupt. I found that the ice is not configured properly. So I need to change the RTCConfiguration. If only items in RTCPeerClientConfiguration work, how to deal with the network change case seamlessly

Jianjun_Z_Intel
Employee
220 Views

SDK 3.3 does not perform ICE restart when networks changed. config.candidateNetworkPolicy controls what kind of candidates are collected.

Reply