Inherits from NSObject
Declared in RespokeCall.h

Overview

WebRTC Call including getUserMedia, path and codec negotation, and call state.

Tasks

Other Methods

  •   delegate

    The delegate that should receive notifications from the RespokeCallDelegate protocol

    property
  •   localView

    The UIView on which to display the local video for the call

    property
  •   remoteView

    The UIView on which to display the remote video for the call

    property
  •   audioOnly

    Indicates that the call only supports audio

    property
  •   timestamp

    The call timestamp

    property
  • – answer

    Answer the call and start the process of obtaining media. This method is called automatically on the caller’s side. This method must be called on the callee’s side to indicate that the endpoint does wish to accept the call. The app will have a later opportunity, by passing a callback named previewLocalMedia, to approve or reject the call based on whether audio and/or video is working and is working at an acceptable level.

  • – hangup:

    Tear down the call, release user media.

  • – hasMedia

    Indicate whether the call has media flowing.

  • – hasAudio

    Indicate whether the call has audio flowing.

  • – hasVideo

    Indicate whether the call has video flowing.

  • – muteVideo:

    Mute or unmute the local video

  • – videoIsMuted

    Indicates if the local video stream is muted

  • – muteAudio:

    Mute or unmute the local audio

  • – audioIsMuted

    Indicates if the local audio stream is muted

  • – switchVideoSource:

    Change which physical camera is used as the video source for the call

  • – getRemoteEndpoint

    Get the remote endpoint with which the call is taking place

  • – isCaller

    Indicates if the local client initiated the call

  • – getStatsWithDelegate:atInterval:

    Start gathering statistics. Statistics will be delivered to the delegate once a connection is established.

  • – stopStats

    Stop gathering statistics.

private Methods

Properties

audioOnly

@property (readonly) BOOL audioOnly
Discussion

Indicates that the call only supports audio

Declared In

RespokeCall.h

delegate

@property (weak) id<RespokeCallDelegate> delegate
Discussion

The delegate that should receive notifications from the RespokeCallDelegate protocol

Declared In

RespokeCall.h

localView

@property (weak) UIView *localView
Discussion

The UIView on which to display the local video for the call

Declared In

RespokeCall.h

remoteView

@property (weak) UIView *remoteView
Discussion

The UIView on which to display the remote video for the call

Declared In

RespokeCall.h

timestamp

@property (readonly) NSDate *timestamp
Discussion

The call timestamp

Declared In

RespokeCall.h

Class Methods

deinitializeSSL

+ (void)deinitializeSSL
Discussion

Trigger SSL deinitialization if necessary

Declared In

RespokeCall+private.h

Instance Methods

answer

- (void)answer
Discussion

Answer the call and start the process of obtaining media. This method is called automatically on the caller’s side. This method must be called on the callee’s side to indicate that the endpoint does wish to accept the call. The app will have a later opportunity, by passing a callback named previewLocalMedia, to approve or reject the call based on whether audio and/or video is working and is working at an acceptable level.

Declared In

RespokeCall.h

answerReceived:fromConnection:

- (void)answerReceived:(NSDictionary *)remoteSDP fromConnection:(NSString *)remoteConnection
Discussion

Process an answer message received from the remote endpoint

Parameters

remoteSDP

Remote SDP data

remoteConnection

Remote connection that answered the call

Declared In

RespokeCall+private.h

audioIsMuted

- (BOOL)audioIsMuted
Discussion

Indicates if the local audio stream is muted

Return Value

returns true if the local audio stream is currently muted

Declared In

RespokeCall.h

connectedReceived

- (void)connectedReceived
Discussion

Process a connected messsage received from the remote endpoint

Declared In

RespokeCall+private.h

directConnectionDidAccept:

- (void)directConnectionDidAccept:(RespokeDirectConnection *)sender
Discussion

Notify the call that the specified direct connection was accepted

Declared In

RespokeCall+private.h

directConnectionDidClose:

- (void)directConnectionDidClose:(RespokeDirectConnection *)sender
Discussion

Notify the call that the specified direct connection closed

Declared In

RespokeCall+private.h

directConnectionDidOpen:

- (void)directConnectionDidOpen:(RespokeDirectConnection *)sender
Discussion

Notify the call that the specified direct connection opened

Declared In

RespokeCall+private.h

directConnectionError:

- (void)directConnectionError:(RespokeDirectConnection *)sender
Discussion

Notify the call that the specified direct connection experienced an error

Declared In

RespokeCall+private.h

getPeerConnection

- (RTCPeerConnection *)getPeerConnection
Discussion

Return the current peer connection object

Declared In

RespokeCall+private.h

getRemoteEndpoint

- (RespokeEndpoint *)getRemoteEndpoint
Discussion

Get the remote endpoint with which the call is taking place

Declared In

RespokeCall.h

getSessionID

- (NSString *)getSessionID
Discussion

Get the session ID of this call

Return Value

The session ID

Declared In

RespokeCall+private.h

getStatsWithDelegate:atInterval:

- (void)getStatsWithDelegate:(id<RespokeMediaStatsDelegate>)delegate atInterval:(NSTimeInterval)interval
Discussion

Start gathering statistics. Statistics will be delivered to the delegate once a connection is established.

Call stopStats to stop gathering statistics.

Parameters

delegate

The stats delegate

interval

The interval at which to deliver stats in seconds

Declared In

RespokeCall.h

hangup:

- (void)hangup:(BOOL)shouldSendHangupSignal
Discussion

Tear down the call, release user media.

Parameters

shouldSendHangupSignal

Send a hangup signal to the remote party if signal is not false and we have not received a hangup signal from the remote party.

Declared In

RespokeCall.h

hangupReceived

- (void)hangupReceived
Discussion

Process a hangup message from the received from the remote endpoint

Declared In

RespokeCall+private.h

hasAudio

- (BOOL)hasAudio
Discussion

Indicate whether the call has audio flowing.

Return Value

YES if call has audio flowing.

Declared In

RespokeCall.h

hasMedia

- (BOOL)hasMedia
Discussion

Indicate whether the call has media flowing.

Return Value

YES if call has audio or video flowing.

Declared In

RespokeCall.h

hasVideo

- (BOOL)hasVideo
Discussion

Indicate whether the call has video flowing.

Return Value

YES if call has video flowing.

Declared In

RespokeCall.h

iceCandidatesReceived:

- (void)iceCandidatesReceived:(NSArray *)candidates
Discussion

Process ICE candidates suggested by the remote endpoint

Parameters

candidates

Array of candidates to evaluate

Declared In

RespokeCall+private.h

initWithSignalingChannel:endpoint:audioOnly:directConnectionOnly:

- (instancetype)initWithSignalingChannel:(RespokeSignalingChannel *)channel endpoint:(RespokeEndpoint *)endpoint audioOnly:(BOOL)audioOnly directConnectionOnly:(BOOL)directConnectionOnly
Discussion

Initialize a new Call with the specified signaling channel

Parameters

channel

The signaling channel to use

endpoint

The remote endpoint

audioOnly

If true, only audio is supported on this call

directConnectionOnly

Indicates that this call is only for a direct connection

Return Value

A newly initialized RespokeCall instance

Declared In

RespokeCall+private.h

initWithSignalingChannel:endpointID:type:audioOnly:

- (instancetype)initWithSignalingChannel:(RespokeSignalingChannel *)channel endpointID:(NSString *)endpointID type:(NSString *)type audioOnly:(BOOL)newAudioOnly
Discussion

Initialize a new Call with the specified signaling channel

Parameters

channel

The signaling channel to use

endpointID

The remote endpointID

type

The remote endpoint type

audioOnly

If true, only audio is supported on this call

Return Value

A newly initialized RespokeCall instance

Declared In

RespokeCall+private.h

initWithSignalingChannel:incomingCallSDP:sessionID:connectionID:endpointID:fromType:endpoint:directConnectionOnly:timestamp:

- (instancetype)initWithSignalingChannel:(RespokeSignalingChannel *)channel incomingCallSDP:(NSDictionary *)sdp sessionID:(NSString *)sessionID connectionID:(NSString *)connectionID endpointID:(NSString *)endpointID fromType:(NSString *)fromType endpoint:(RespokeEndpoint *)endpoint directConnectionOnly:(BOOL)directConnectionOnly timestamp:(NSDate *)timestamp
Discussion

Initialize a new Call with the specified signaling channel and incoming SDP configuration

Parameters

channel

The signaling channel to use

sdp

Incoming SDP configuration from a remote party attempting to call this client

sessionID

The session ID of the incoming call

connectionID

The remote connection ID initiating the call

endpointID

The endpointID used as the signaling destination

fromType

The type of the signaling destination

endpoint

The remote endpoint

directConnectionOnly

Indicates that this call is only for a direct connection

Return Value

A newly initialized RespokeCall instance

Declared In

RespokeCall+private.h

isCaller

- (BOOL)isCaller
Discussion

Indicates if the local client initiated the call

Declared In

RespokeCall.h

muteAudio:

- (void)muteAudio:(BOOL)mute
Discussion

Mute or unmute the local audio

Parameters

mute

If true, mute the audio. If false, unmute the audio

Declared In

RespokeCall.h

muteVideo:

- (void)muteVideo:(BOOL)mute
Discussion

Mute or unmute the local video

Parameters

mute

If true, mute the video. If false, unmute the video

Declared In

RespokeCall.h

startCall

- (void)startCall
Discussion

Start the outgoing call process

Declared In

RespokeCall+private.h

stopStats

- (void)stopStats
Discussion

Stop gathering statistics.

Declared In

RespokeCall.h

switchVideoSource:

- (void)switchVideoSource:(BOOL)useFrontFacingCamera
Discussion

Change which physical camera is used as the video source for the call

Parameters

useFrontFacingCamera

Uses the front-facing camera when true, back-facing camera when false

Declared In

RespokeCall.h

videoIsMuted

- (BOOL)videoIsMuted
Discussion

Indicates if the local video stream is muted

Return Value

returns true if the local video stream is currently muted

Declared In

RespokeCall.h