javascript - PubNub webrtc only working on local network -
ive asked question before without luck.. im having problems following tutorial https://www.pubnub.com/blog/2014-10-21-building-a-webrtc-video-and-voice-chat-application/ . ive written code , works flawlessly on local network, when try connect remote client(i.e. not on same network) code doesnt work anymore. shows black screen video client should be.
phone.receive(function(session){ session.connected(function(session){ $("#vid-box").append(session.video); //outputs black screen }); session.ended(function(session) {alert("call ended: "+session.number}); });
ive contacted pubnub unable help. has ideas?
webrtc double nat oh no!
⚠️ turn server not provided ⚠️
make sure not on nat network forwarding. otherwise you'll need turn servers
(not provided). turn servers broker network traffic , allow constrained network video conversations. mobile providers basic open routing (non-nat). corporate firewalls have @ least 1 nat.
- turn streams binary video. needed nated networks not required.
- stun resolves ip address. peer peer discovery.
- pubnub sends ip address.
stun provides ip address. there nothing in webrtc provide means exchange ip address between connecting clients. pubnub comes in.
webrtc resources , sdk links
- download: zip download webrtc sdk
- github: github repository webrtc sdk
- documentation: github webrtc documentation
- video: what webrtc video introduction
- demo: webrtc live calling app demo
Comments
Post a Comment