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.

webrtc

stun provides ip address. there nothing in webrtc provide means exchange ip address between connecting clients. pubnub comes in.

sturn versus turn server webrtc

webrtc resources , sdk links


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -