Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
1151 Discussions

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

zhang_s_1
Beginner
1,279 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
1,279 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!

0 Kudos
Jianjun_Z_Intel
Employee
1,279 Views

Hi Zhang,

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

0 Kudos
zhang_s_1
Beginner
1,279 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

0 Kudos
Jianjun_Z_Intel
Employee
1,279 Views

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

0 Kudos
Reply