Git Product home page Git Product logo

Comments (4)

sepfy avatar sepfy commented on September 15, 2024

This server is provided by libnice. Of course you can change to google stun server.

I am not sure whether it is possible to avoid using stun server or not, but if you want to use local isolated network, you can consider run a stun server on your machine. The stun server has been built in pear/third_party/libnice/builddir/stun/tools.
Then modify STUN_ADDR in pear/src/peer_connection.c and iceServers of pear/examples/surveillance/index.html to your local IP address.

And if you want to use google stun server, you need to try to build the Google WebRTC native code. It will generate a stun server binary.

from libpeer.

aldoshkind avatar aldoshkind commented on September 15, 2024

My question was not exact and clear enough as I am newbie to WebRTC.
Problem was that examples was not working if I set iceServers = [] in index.html
After some digging I found that enabling mDNS solves the problem.
But while it works in Chromium/Opera, it doesn't in Firefox, possibly due to this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1691189. I use Ubuntu 18.04 and 20.04 and browser binaries from official ubuntu repos.
Have you had any experience using pear with Firefox?

from libpeer.

sepfy avatar sepfy commented on September 15, 2024

I have tried using Firefox, but it doesn't work.
If there is a candidate in SDP is xxxx.local, it means you need to enable mDNS. When I tested with Firefox, I checked there is no candidate using mDNS, so I guess it has nothing to do with mDNS. I'm still debugging

You can check your offer SDP with browser console by modifying code as bellow

diff --git a/examples/surveillance/index_html.h b/examples/surveillance/index_html.h
index 00a194f..db706e4 100644
--- a/examples/surveillance/index_html.h
+++ b/examples/surveillance/index_html.h
@@ -18,6 +18,7 @@ const char index_html[] = " \
       }); \n \
       var log = msg => { console.log(msg); }; \n \
       function sendOfferToCall(sdp) { \n \
+        console.log(sdp);\n \
         var xhttp = new XMLHttpRequest(); \n \
         xhttp.onreadystatechange = function() { \n \
           if (this.readyState == 4 && this.status == 200) { \n \

from libpeer.

aldoshkind avatar aldoshkind commented on September 15, 2024

In our project we disable mdns. Firefox indeed has strange behavior with mdns, but the problem may be relaxed by disabling mdns obfuscation (go to about:config and turn off media.peerconnection.ice.obfuscate_host_addresses)
There were more problems in supporting Firefox, I can share my expirience in separate issue if you are interested. Also you can investigate my fork here https://github.com/aldoshkind/pear

from libpeer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.