A block-based API (and a nicer init
method) for RTCPeerConnection from webrtc.org. I've submitted the same API to the WebRTC project, but it hasn't been merged yet and I want this API for other projects without making a custom build.
I've added a nicer init
method that provides some default constraints.
JAHPeerConnection* peerConnection = [[JAHPeerConnection alloc] initWithICEServers:servers constraints:constraints peerConnectionFactory:peerConnectionFactory];
peerConnection.delegate = self;
The delegate-based API has been replaced with a blocks-based API.
[self.peerConnection createOfferWithConstraints:constraints completion:^(RTCSessionDescription *sessionDescription, NSError *error) {
// Do other stuff now that we have the offer
}];
MIT
This was created by @hjon.