NBMWebRTCPeerDelegate Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | NBMWebRTCPeer.h |
Overview
NBMWebRTCPeerDelegate is a protocol for an object that must be implemented to get messages from NBMWebRTCPeer.
– webRTCPeer:didGenerateOffer:forConnection:
required method
Called when the peer successfully generated an new offer for a connection.
- (void)webRTCPeer:(NBMWebRTCPeer *)peer didGenerateOffer:(RTCSessionDescription *)sdpOffer forConnection:(NBMPeerConnection *)connection
Parameters
peer |
The peer sending the message. |
---|---|
sdpOffer |
The newly generated RTCSessionDescription offer. |
connection |
The connection for which the offer was generated. |
Declared In
NBMWebRTCPeer.h
– webRTCPeer:didGenerateAnswer:forConnection:
required method
Called when the peer successfully generated a new answer for a connection.
- (void)webRTCPeer:(NBMWebRTCPeer *)peer didGenerateAnswer:(RTCSessionDescription *)sdpAnswer forConnection:(NBMPeerConnection *)connection
Parameters
peer |
The peer sending the message. |
---|---|
sdpAnswer |
The newly generated RTCSessionDescription offer. |
connection |
The connection for which the aswer was generated. |
Declared In
NBMWebRTCPeer.h
– webRTCPeer:hasICECandidate:forConnection:
required method
Called when a new ICE is locally gathered for a connection.
- (void)webRTCPeer:(NBMWebRTCPeer *)peer hasICECandidate:(RTCICECandidate *)candidate forConnection:(NBMPeerConnection *)connection
Parameters
peer |
The peer sending the message. |
---|---|
candidate |
The locally gathered ICE. |
connection |
The connection for which the ICE was gathered. |
Declared In
NBMWebRTCPeer.h
– webrtcPeer:iceStatusChanged:ofConnection:
required method
Called any time a connection’s state changes.
- (void)webrtcPeer:(NBMWebRTCPeer *)peer iceStatusChanged:(RTCICEConnectionState)state ofConnection:(NBMPeerConnection *)connection
Parameters
peer |
The peer sending the message. |
---|---|
state |
The new notified state. |
connection |
The connection whose state has changed. |
Declared In
NBMWebRTCPeer.h
– webRTCPeer:didAddStream:ofConnection:
required method
Called when media is received on a new stream from remote peer.
- (void)webRTCPeer:(NBMWebRTCPeer *)peer didAddStream:(RTCMediaStream *)remoteStream ofConnection:(NBMPeerConnection *)connection
Parameters
peer |
The peer sending the message. |
---|---|
remoteStream |
A RTCMediaStream instance. |
connection |
The connection related to the stream. |
Declared In
NBMWebRTCPeer.h
– webRTCPeer:didRemoveStream:ofConnection:
required method
Called when a remote peer close a stream.
- (void)webRTCPeer:(NBMWebRTCPeer *)peer didRemoveStream:(RTCMediaStream *)remoteStream ofConnection:(NBMPeerConnection *)connection
Parameters
peer |
The peer sending the message. |
---|---|
remoteStream |
A RTCMediaStream instance. |
connection |
The connection related to the stream. |
Declared In
NBMWebRTCPeer.h