Skip to content

hjon/JAHPeerConnection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JAHPeerConnection

What is this?

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.

Usage

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
}];

License

MIT

Created By

This was created by @hjon.

About

A block-based API for RTCPeerConnection from webrtc.org.

Resources

License

Stars

Watchers

Forks

Packages

No packages published