CPConfig
Objective-C
@interface CPConfig : NSObject
Swift
class CPConfig : NSObject
Utility class for common configuration management.
Since
1.0.0-
Device token which is used when receiving remote notifications.
Since
2.3.0Declaration
Objective-C
@property (nonatomic, strong) NSString *_Nonnull standardDeviceToken;
Swift
var standardDeviceToken: String { get set }
-
Device token which is used when receiving remote notifications.
Since
2.3.0Declaration
Objective-C
@property (nonatomic, strong) NSString *_Nonnull voipDeviceToken;
Swift
var voipDeviceToken: String { get set }
-
Server IP information of the baseUrl used for REST request.
Since
1.0.0Declaration
Objective-C
@property (nonatomic, strong) NSString *_Nonnull restServerUrl;
Swift
var restServerUrl: String { get set }
-
Server Port information of the baseUrl used for REST request. Default value is 443.
Since
1.0.0Declaration
Objective-C
@property (nonatomic, strong) NSString *_Nonnull restServerPort;
Swift
var restServerPort: String { get set }
-
IP information used in web socket connection creation.
Since
1.0.0Declaration
Objective-C
@property (nonatomic, strong) NSString *_Nonnull webSocketServerUrl;
Swift
var webSocketServerUrl: String { get set }
Return Value
String
-
Port information used in web socket connection creation. Default value is 443.
Since
1.0.0Declaration
Objective-C
@property (nonatomic, strong) NSString *_Nonnull webSocketServerPort;
Swift
var webSocketServerPort: String { get set }
Return Value
String
-
Web socket Self signed certificate file data. Can be fetched from a file or string.
NSString *cerPath = [[NSBundle mainBundle\ pathForResource:@"myOwnCertificate" ofType:@"der"\; [[Configuration getInstance] setWebSocketCertificate:[[NSData alloc\ initWithContentsOfFile:cerPath\\;
Since
1.0.0Declaration
Objective-C
@property (nonatomic, strong) NSData *_Nullable webSocketCertificate;
Swift
var webSocketCertificate: Data? { get set }
-
Sets the preferred set of codecs to use in audio and video calls.
Since
1.0.0Declaration
Objective-C
@property (nonatomic, strong) CPCodecSet *_Nonnull preferredCodecSet;
Swift
var preferredCodecSet: CPCodecSet { get set }
-
Sets codecPayloadTypeSet to modify payload numbers of audio and video codecs
Since
1.4.0Declaration
Objective-C
@property (nonatomic, strong) NSArray<CPCodecToReplace *> *_Nullable codecPayloadTypeSet;
Swift
var codecPayloadTypeSet: [CPCodecToReplace]? { get set }
-
Sets the ICE option as ICE_VANILLA or ICE_TRICKLE. Default ICE option is ICE_VANILLA.
Since
1.0.0Declaration
Objective-C
@property (nonatomic) CPICEOptions iceOption;
Swift
var iceOption: CPICEOptions { get set }
-
Specifies timeout value of ICE Collection. Default value is 10 and it means that waits 10 seconds for ice gathering. if it is set as 0, it means that waits until ice gathering completion.
Since
1.0.0- Modified: 2.6.0
Declaration
Objective-C
@property (nonatomic) NSTimeInterval ICECollectionTimeout;
Swift
var iceCollectionTimeout: TimeInterval { get set }
-
Sets the ICE servers.
Since
1.0.0Declaration
Objective-C
@property (nonatomic, strong) CPICEServers *_Nonnull ICEServers;
Swift
var iceServers: CPICEServers { get set }
-
Sets initial video resolution for video. Value should be one of the AVCaptureSessionPreset strings.
If camera does not support the specified value or videoResolution value is to nil 720p resolution will be used as default.
See
AVCaptureSessionPreset
Since
1.0.0
Declaration
Objective-C
@property (nonatomic, strong) NSString *_Nonnull videoResolution;
Swift
var videoResolution: String { get set }
-
Server certificate to be used in HTTPS connection.Certificate must be .DER format.
NSString *cerPath = [[NSBundle mainBundle\ pathForResource:@"myOwnCertificate" ofType:@"der"\; [[Configuration getInstance] setWebSocketCertificate:[[NSData alloc\ initWithContentsOfFile:cerPath\\;
Since
1.0.0Declaration
Objective-C
@property (nonatomic, strong) NSData *_Nullable serverCertificate;
Swift
var serverCertificate: Data? { get set }
-
Sets the audio codec configurations. If parameter is null WebRTC defaults will be use. Warning: This is advance usage if you don’t have expertise on audio codecs, especially opus, don’t use it.
Since
1.0.0Declaration
Objective-C
@property (nonatomic, strong) CPAudioCodecConfiguration *_Nonnull audioCodecConfigurations;
Swift
var audioCodecConfigurations: CPAudioCodecConfiguration { get set }
-
Sets the camera orientation type of video capturer. Video orientation can be changed according to application status bar orientation or device orientation. Camera can be bind to this notifications or not to be bind anything. Default value is device orientation.
Since
1.0.0Declaration
Objective-C
@property (nonatomic) CPCameraOrientationMode orientationMode;
Swift
var orientationMode: CPCameraOrientationMode { get set }
-
Scaling style parameter for local and remote video views. Default value is SCALINGSTYLE_ASPECT_RATIO_FIT
Since
2.15.0Declaration
Objective-C
@property (nonatomic) CPScalingStyles scalingStyle;
Swift
var scalingStyle: CPScalingStyles { get set }
-
Sets the default camera position mode.
See
AVCaptureDevicePosition Default value is front camera.
Since
1.0.0
Declaration
Objective-C
@property (nonatomic) AVCaptureDevicePosition cameraPosition;
Swift
var cameraPosition: AVCaptureDevice.Position { get set }
-
Sets duration value of DTMF tones im ms. Default value is 600 and can be between 40 and 6000.
- Updated: 2.0.0
Declaration
Objective-C
@property (nonatomic) NSUInteger dtmfToneDuration;
Swift
var dtmfToneDuration: UInt { get set }
-
Sets audio session configuration.
See
AVAudioSession Default value is not set, so it will use default value of WebRTC.Since
1.0.0Declaration
Objective-C
@property (nonatomic, strong) CPAudioSessionConfiguration *_Nonnull audioSessionConfiguration;
Swift
var audioSessionConfiguration: CPAudioSessionConfiguration { get set }
-
Indicates log manager.
Since
1.0.0Declaration
Objective-C
@property (nonatomic, strong, readonly) CPLogManager *_Nonnull logManager;
Swift
var logManager: CPLogManager { get }
-
Sending audit message frequency (seconds). Default value is 30 seconds.
Since
1.0.0Declaration
Objective-C
@property (nonatomic) NSInteger auditFrequency;
Swift
var auditFrequency: Int { get set }
-
Forces to disable media transfer when media on hold is active. It helps to fix some MOH issues on PSTN calls Default value is NO.
@since 1.0.2
Declaration
Objective-C
@property (nonatomic) BOOL forceDisableMediaOnHold;
Swift
var forceDisableMediaOnHold: Bool { get set }
-
Ringing feedback configuration parameter. Default value is CLIENT.
@since 2.15.0
Declaration
Objective-C
@property (nonatomic) CPRingingFeedbackOptions ringingFeedbackOption;
Swift
var ringingFeedbackOption: CPRingingFeedbackOptions { get set }
-
Bandwidth limit of receiving media If not set, WebRTC values are used.
@since 1.7.0
Declaration
Objective-C
@property (nonatomic, strong) CPCallReceiveBandwidthLimit *_Nullable receiveBandwidthLimit;
Swift
var receiveBandwidthLimit: CPCallReceiveBandwidthLimit? { get set }
-
This method returns (creates if necessary) singleton instance of Configuration class
Since
1.0.0
Declaration
Objective-C
+ (nonnull instancetype)sharedInstance;
Swift
class func sharedInstance() -> Self
Return Value
shared Configuration instance