NBMWebRTCPeer Class Reference

Inherits from NSObject
Declared in NBMWebRTCPeer.h

  mediaConfiguration

The media configuration object.

@property (nonatomic, strong, readonly) NBMMediaConfiguration *mediaConfiguration

Declared In

NBMWebRTCPeer.h

  localStream

The local stream.

@property (nonatomic, strong, readonly) RTCMediaStream *localStream

Declared In

NBMWebRTCPeer.h

  cameraPosition

@property (nonatomic, assign, readonly) NBMCameraPosition cameraPosition

  delegate

The delegate object for the peer.

@property (nonatomic, weak, readonly) id<NBMWebRTCPeerDelegate> delegate

Declared In

NBMWebRTCPeer.h

– initWithDelegate:configuration:

Initializes a new Web RTC peer manager.

- (instancetype)initWithDelegate:(id<NBMWebRTCPeerDelegate>)delegate configuration:(NBMMediaConfiguration *)configuration

Parameters

delegate

The delegate object for the peer manager.

configuration

A media configuration object.

Return Value

An initialized Web RTC peer manager.

Declared In

NBMWebRTCPeer.h

– generateOffer:

Create a new offer for connection with specified identifier.

- (void)generateOffer:(NSString *)connectionId

Parameters

connectionId

The connection identifier.

Declared In

NBMWebRTCPeer.h

– generateOffer:completion:

- (void)generateOffer:(NSString *)connectionId completion:(void ( ^ ) ( NSString *sdpOffer , NBMPeerConnection *connection ))block

– processOffer:connectionId:

Process a remote offer for connection with specified identifier.

- (void)processOffer:(NSString *)sdpOffer connectionId:(NSString *)connectionId

Parameters

sdpOffer

The SDP offer.

connectionId

The connection identifier.

Declared In

NBMWebRTCPeer.h

– processAnswer:connectionId:

Process a remote answer for connection with specified identifier.

- (void)processAnswer:(NSString *)sdpAnswer connectionId:(NSString *)connectionId

Parameters

sdpAnswer

The SDP answer.

connectionId

The connection identifier.

Declared In

NBMWebRTCPeer.h

– addICECandidate:connectionId:

Provides a remote candidate to ICE agent for connection with specified identifier.

- (void)addICECandidate:(RTCICECandidate *)candidate connectionId:(NSString *)connectionId

Parameters

candidate

A RTCICECandidate instance.

connectionId

The connection identifier.

Declared In

NBMWebRTCPeer.h

– connectionWithConnectionId:

Retrives a NBMPeerConnection instance with specified identifier.

- (NBMPeerConnection *)connectionWithConnectionId:(NSString *)connectionId

Parameters

connectionId

The connection identifier.

Return Value

A NBMPeerConnection instance, nil if no connection was found.

Declared In

NBMWebRTCPeer.h

– closeConnectionWithConnectionId:

Terminates all media and closes the transport of NBMPeerConnection with specified identifier.

- (void)closeConnectionWithConnectionId:(NSString *)connectionId

Parameters

connectionId

The connection identifier.

Declared In

NBMWebRTCPeer.h

– startLocalMedia

- (BOOL)startLocalMedia

– stopLocalMedia

Terminates all media of active connections, removing the local stream.

- (void)stopLocalMedia

Declared In

NBMWebRTCPeer.h

– activeConnections

- (NSArray *)activeConnections

– selectCameraPosition:

- (void)selectCameraPosition:(NBMCameraPosition)cameraPosition

– hasCameraPositionAvailable:

- (BOOL)hasCameraPositionAvailable:(NBMCameraPosition)cameraPosition

– isVideoEnabled

- (BOOL)isVideoEnabled

– enableVideo:

- (void)enableVideo:(BOOL)enable

– isAudioEnabled

- (BOOL)isAudioEnabled

– enableAudio:

- (void)enableAudio:(BOOL)enable

– videoAuthorized

- (BOOL)videoAuthorized

– audioAuthorized

- (BOOL)audioAuthorized