stasel / WebRTC-iOS

A simple native WebRTC demo iOS app using swift
Apache License 2.0
1.12k stars 241 forks source link

Using my own peerconnection server #52

Closed lg-tawsenior closed 4 years ago

lg-tawsenior commented 4 years ago

Where do I change the code to point to my own server for peer connection? I assume the config.swift file gets changed for using my turn server, but is the signaling server the same is a peer connection server?

stasel commented 4 years ago

Signaling server is different from STUN/TURN servers (WebRTC needs that). WebRTC doesn't know anything about the signaling server and it can be implemented in any method you want. In this example its a simple WebSocket broadcast server. There is a link to another example using Firebase in the README file.

If you want to change the STUN/TURN servers then yes, it is in config.swift. If you want to have your own signaling server, you should implement yourself.

andreamendoza000 commented 4 years ago

Hi, I have been doing a research since Friday about how to adapt this project so that it can connect to a PeerJS signaling server. But I'm only able to connect each app phone to the server, but the server never receives the payload with sdp. Could you please help me? Thank you in advance.

stasel commented 4 years ago

Hi @andreamendoza000 , I am not familiar with PeerJS so I can't help you with that. You should implement your own SignalingClient and use it in the demo if you wish