VICall
Interface that may be used for call operations like answer, reject, hang up and mid-call operations like hold, start/stop video and others.
Methods
addDelegate:
- (void
)addDelegate:(id<VICallDelegate>
)delegate
Add call delegate to handle call events.
Parameters
delegate:
id<VICallDelegate>
Object registering as an delegate.
Returns
type:
void
answerWithSettings:
- (void
)answerWithSettings:()settings
Answer incoming call.
Parameters
settings:
Call settings with additional call parameters, such as preferred video codec, custom data, extra headers etc.
Returns
type:
void
duration
- (NSTimeInterval
)duration
Get the call duration.
Returns
type:
NSTimeInterval
hangupWithHeaders:
- (void
)hangupWithHeaders:(nullable NSDictionary *
)headers
Terminates call. Call should be either established or outgoing progressing.
Parameters
headers:
nullable NSDictionary *
Optional set of headers to be sent with message. Names must begin with "X-" to be processed by SDK.
Returns
type:
void
issueLevelForType:
- ()issueLevelForType:()type
Get current level of specific quality issue.
Parameters
type:
Quality issue type.
Returns
type:
qualityIssues
- (NSArray<VIQualityIssueType> *
)qualityIssues
Get all quality issues types.
Returns
type:
NSArray<VIQualityIssueType> *
rejectWithMode:headers:
- (void
)rejectWithMode:()mode
headers:(nullable NSDictionary *
)headers
Reject incoming call.
Parameters
mode:
Specify mode of call rejection.
headers:
nullable NSDictionary *
Optional set of headers to be sent with message. Names must begin with "X-" to be processed by SDK.
Returns
type:
void
removeDelegate:
- (void
)removeDelegate:(id<VICallDelegate>
)delegate
Remove previously added delegate.
Parameters
delegate:
id<VICallDelegate>
Previously added delegate.
Returns
type:
void
sendDTMF:
- (BOOL
)sendDTMF:(NSString *
)dtmf
Send DTMF within the call.
Parameters
dtmf:
NSString *
DTMFs.
Returns
type:
BOOL
sendInfo:mimeType:headers:
- (void
)sendInfo:(NSString *
)body
mimeType:(NSString *
)mimeType
headers:(nullable NSDictionary *
)headers
Send INFO message within the call.
Parameters
body:
NSString *
Custom string data.
mimeType:
NSString *
MIME type of info.
headers:
nullable NSDictionary *
Optional set of headers to be sent with message. Names must begin with "X-" to be processed by SDK
Returns
type:
void
sendMessage:
- (void
)sendMessage:(NSString *
)message
Send message within the call. Implemented atop SIP INFO for communication between call endpoint and Voximplant cloud, and is separated from Voximplant messaging API.
Parameters
message:
NSString *
Message text.
Returns
type:
void
setHold:completion:
- (void
)setHold:(BOOL
)hold
completion:(nullable VICompletionBlock
)completion
Hold or unhold the call.
Hold functionality is not supported in conference calls. In case of conference call it will return VICallErrorCodeIncorrectOperation via the completion block.
Parameters
hold:
BOOL
YES if the call should be put on hold, NO for unhold.
completion:
nullable VICompletionBlock
Completion block to handle the result of the operation.
Returns
type:
void
setSendVideo:completion:
- (void
)setSendVideo:(BOOL
)video
completion:(nullable VICompletionBlock
)completion
Start or stop sending video for the call.
Starting the version 2.34.3 the API behaves the same way for conference and video calls.
For the version 2.34.2 and below for the conference video call mutes or un-mutes video send (video stream in the 'muted' state will still consume a small bandwidth).
Parameters
video:
BOOL
YES if video should be sent, NO otherwise.
completion:
nullable VICompletionBlock
Completion block to handle the result of the operation.
Returns
type:
void
start
- (void
)start
Start outgoing call.
Returns
type:
void
startInAppScreenSharing:
- (void
)startInAppScreenSharing:(nullable VICompletionBlock
)completion
Starts in-app screen sharing.
Note that before recording actually starts, the user may be prompted with UI to confirm recording.
Captures screen only inside the application. Simulator is not supported.
Use [VICall setSendVideo:completion:] method with "sendVideo" variable "YES" value to return to the default capture mode (camera or custom camera mode).
Use [VICall setSendVideo:completion:] method with "sendVideo" variable "NO" value to stop screen capturing.
Video of the screen is sent in HD quality (720p).
Parameters
completion:
nullable VICompletionBlock
Completion block to handle the result of the operation.
Returns
type:
void
startReceiveVideoWithCompletion:
- (void
)startReceiveVideoWithCompletion:(nullable VICompletionBlock
)completion
Start receive video if video receive was not enabled before. Stop receiving video during the call is not supported.
Parameters
completion:
nullable VICompletionBlock
Completion block to handle the result of operation.
Returns
type:
void
Props
callId
@property (strong, readonly, nonatomic) NSString *
callId
The call id.
Returns
type:
NSString *
callKitUUID
@property (strong, nullable, nonatomic) NSUUID *
callKitUUID
The CallKit UUID that may be used to match an incoming call with a push notification received before.
Always nil for outgoing calls on VICall instance creation.
For outgoing calls it is recommended to set CXStartCallAction.callUUID value to this property on handling CXStartCallAction
Returns
type:
NSUUID *
endpoints
@property (strong, readonly, nonatomic) NSArray<VIEndpoint *> *
endpoints
An array of the endpoints associated with the call.
Returns
type:
NSArray<VIEndpoint *> *
localVideoStreams
@property (strong, readonly, nonatomic) NSArray<VILocalVideoStream *> *
localVideoStreams
The local video streams associated with the call.
Returns
type:
NSArray<VILocalVideoStream *> *
qualityIssueDelegate
@property (weak, nullable, nonatomic) qualityIssueDelegate
Set VIQualityIssueDelegate to monitor issues that affect call quality.
Returns
type:
sendAudio
@property (assign, nonatomic) BOOL
sendAudio
A Boolean value that determines whether an audio is transferred from microphone into the call.
Setting this property enables or disables audio transfer.
Returns
type:
BOOL
videoEnabled
@property (assign, readonly, nonatomic, getter = isVideoEnabled) BOOL
videoEnabled
A Boolean value that determines whether a video is enabled in the call.
Returns
type:
BOOL
videoSource
@property (strong, nullable, nonatomic) videoSource
Video source currently used in the call.
Default value:
- nil for audio calls,
- [VICameraManager sharedCameraManager] is used for video calls.
Must be set before using [VICall start] and [VICall answerWithSettings:] if needed.
Returns
type: