Johni0702 / mumble-web

An HTML5 Mumble client
683 stars 151 forks source link

WebRTC mumble-web works in chrome/edge, but not in firefox #136

Open seeba8 opened 4 years ago

seeba8 commented 4 years ago

Tested with the newest firefox (82) and firefox nightly (84) and turned off tracking protection. This is the log I get when it works (i.e., when I log on with Edge):

New connection from [::ffff:127.0.0.1]:35796
MSG Authenticate: username: "test" password: "test" opus: false webrtc: true
Local ice candidate: 1 1 UDP 2013266431 fe80::6c3d:9ee8:3160:1c83 45541 typ host
Local ice candidate: 2 1 TCP 1015023103 fe80::6c3d:9ee8:3160:1c83 0 typ host tcptype active
Local ice candidate: 3 1 TCP 1010828799 fe80::6c3d:9ee8:3160:1c83 39093 typ host tcptype passive
Local ice candidate: 4 1 UDP 2013266430 {{snip}}  54456 typ host
Local ice candidate: 5 1 TCP 1015022079 {{snip}}  0 typ host tcptype active
Local ice candidate: 6 1 TCP 1010827775 {{snip}} 39859 typ host tcptype passive
Local ice candidate: 7 1 UDP 2013266429 192.168.188.42 37953 typ host
Local ice candidate: 8 1 TCP 1015022335 192.168.188.42 0 typ host tcptype active
Local ice candidate: 9 1 TCP 1010828031 192.168.188.42 50751 typ host tcptype passive
Got WebRTC: ice_pwd: "{{snip}}" ice_ufrag: "Isjb" dtls_fingerprint: "45:39:3C:64:3B:CB:4A:49:6B:06:43:24:38:41:33:F5:8C:81:0C:6F:42:37:4D:F7:C6:3E:46:5F:2A:3B:9E:B4"
Got ice candidate: "candidate:115530627 1 udp 2122262783 {{snip}}  57369 typ host generation 0 ufrag Isjb network-id 3"
Got ice candidate: "candidate:3049778169 1 udp 2122197247 {{snip}}  57370 typ host generation 0 ufrag Isjb network-id 4"
Got ice candidate: "candidate:2216843148 1 udp 2122129151 {{snip}}  57371 typ host generation 0 ufrag Isjb network-id 1"
Got ice candidate: "candidate:3202208093 1 udp 2122063615 192.168.188.22 57372 typ host generation 0 ufrag Isjb network-id 2"
Got ice candidate: "candidate:681254461 1 udp 2121998079 {{snip}} 57373 typ host generation 0 ufrag Isjb network-id 5"
DTLS-SRTP connection established.

This is the log when it does not work:

New connection from [::ffff:127.0.0.1]:35818
MSG Authenticate: username: "test2" password: "test" opus: false webrtc: true
Local ice candidate: 1 1 UDP 2013266431 fe80::6c3d:9ee8:3160:1c83 35135 typ host
Local ice candidate: 2 1 TCP 1015023103 fe80::6c3d:9ee8:3160:1c83 0 typ host tcptype active
Local ice candidate: 3 1 TCP 1010828799 fe80::6c3d:9ee8:3160:1c83 59411 typ host tcptype passive
Local ice candidate: 4 1 UDP 2013266430 {{snip}} 55774 typ host
Local ice candidate: 5 1 TCP 1015022079 {{snip}} 0 typ host tcptype active
Local ice candidate: 6 1 TCP 1010827775 {{snip}} 39665 typ host tcptype passive
Local ice candidate: 7 1 UDP 2013266429 192.168.188.42 40050 typ host
Local ice candidate: 8 1 TCP 1015022335 192.168.188.42 0 typ host tcptype active
Local ice candidate: 9 1 TCP 1010828031 192.168.188.42 36169 typ host tcptype passive
Got WebRTC: ice_pwd: "{{snip}}" ice_ufrag: "bf3d274a" dtls_fingerprint: "77:54:56:87:8E:34:19:8F:37:8E:BB:66:31:C5:CD:7C:2D:D3:C6:5D:9E:AE:4E:CB:2E:64:23:BC:B8:E0:E8:50"

Any idea what could be the problem with firefox?

DoM1niC commented 3 years ago

did you open the NAT Stuff -> ICE ? I test it without any Problems here... in the first run I fargot to open the NAT Ports so local was working but external not.... I hope this could help you

like mumble-web-proxy --listen-ws 64737 --server MUMBLE_IP/DOMAIN:PORT --ice-ipv4 EXTERNAL_IP_HERE --ice-port-min 2000 --ice-port-max 2050

I open here in my Example Ports 2000-2050 as TCP and UDP, I hope Coturn could help us to handle this soon if @Johni0702 plan to implemented this.

My NGINX as Example

server {
        listen 80;
        server_name YOURDOMAIN;
        return 301 https://YOURDOMAIN$request_uri;
}
server {
        listen 443 ssl http2;
        server_name YOURDOMAIN;
        index index.html;
        root /var/www/mumble-web;
    ssl_certificate    /etc/letsencrypt/live/YOURDOMAIN/fullchain.pem;
    ssl_certificate_key    /etc/letsencrypt/live/YOURDOMAIN/privkey.pem;

        location / {

        }
        location /mumble {
                proxy_pass http://127.0.0.1:64737;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection $connection_upgrade;
        }
}

config.js

/******/ (function(modules) { // webpackBootstrap
/******/    // The module cache
/******/    var installedModules = {};
/******/
/******/    // The require function
/******/    function __webpack_require__(moduleId) {
/******/
/******/        // Check if module is in cache
/******/        if(installedModules[moduleId]) {
/******/            return installedModules[moduleId].exports;
/******/        }
/******/        // Create a new module (and put it into the cache)
/******/        var module = installedModules[moduleId] = {
/******/            i: moduleId,
/******/            l: false,
/******/            exports: {}
/******/        };
/******/
/******/        // Execute the module function
/******/        modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/        // Flag the module as loaded
/******/        module.l = true;
/******/
/******/        // Return the exports of the module
/******/        return module.exports;
/******/    }
/******/
/******/
/******/    // expose the modules object (__webpack_modules__)
/******/    __webpack_require__.m = modules;
/******/
/******/    // expose the module cache
/******/    __webpack_require__.c = installedModules;
/******/
/******/    // define getter function for harmony exports
/******/    __webpack_require__.d = function(exports, name, getter) {
/******/        if(!__webpack_require__.o(exports, name)) {
/******/            Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/        }
/******/    };
/******/
/******/    // define __esModule on exports
/******/    __webpack_require__.r = function(exports) {
/******/        if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/            Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/        }
/******/        Object.defineProperty(exports, '__esModule', { value: true });
/******/    };
/******/
/******/    // create a fake namespace object
/******/    // mode & 1: value is a module id, require it
/******/    // mode & 2: merge all properties of value into the ns
/******/    // mode & 4: return value when already ns object
/******/    // mode & 8|1: behave like require
/******/    __webpack_require__.t = function(value, mode) {
/******/        if(mode & 1) value = __webpack_require__(value);
/******/        if(mode & 8) return value;
/******/        if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/        var ns = Object.create(null);
/******/        __webpack_require__.r(ns);
/******/        Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/        if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/        return ns;
/******/    };
/******/
/******/    // getDefaultExport function for compatibility with non-harmony modules
/******/    __webpack_require__.n = function(module) {
/******/        var getter = module && module.__esModule ?
/******/            function getDefault() { return module['default']; } :
/******/            function getModuleExports() { return module; };
/******/        __webpack_require__.d(getter, 'a', getter);
/******/        return getter;
/******/    };
/******/
/******/    // Object.prototype.hasOwnProperty.call
/******/    __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/    // __webpack_public_path__
/******/    __webpack_require__.p = "";
/******/
/******/
/******/    // Load entry module and return exports
/******/    return __webpack_require__(__webpack_require__.s = "./app/config.js");
/******/ })
/************************************************************************/
/******/ ({

/***/ "./app/config.js":
/*!***********************!*\
  !*** ./app/config.js ***!
  \***********************/
/*! no static exports found */
/***/ (function(module, exports) {

// Note: You probably do not want to change any values in here because this
//       file might need to be updated with new default values for new
//       configuration options. Use the [config.local.js] file instead!

function getRandomInt(max) {
    return Math.floor(Math.random() * Math.floor(max));
  }

window.mumbleWebConfig = {
  // Which fields to show on the Connect to Server dialog
  'connectDialog': {
    'address': false,
    'port': false,
    'token': false,
    'username': true,
    'password': false,
    'channelName': false
  },
      // Default values for user settings
      // You can see your current value by typing `localStorage.getItem('mumble.$setting')` in the web console.
      'settings': {
        'voiceMode': 'vad', // one of 'cont' (Continuous), 'ptt' (Push-to-Talk), 'vad' (Voice Activity Detection)
        'pttKey': 'ctrl + shift',
        'vadLevel': 0.3,
        'toolbarVertical': false,
        'showAvatars': 'always', // one of 'always', 'own_channel', 'linked_channel', 'minimal_only', 'never'
        'userCountInChannelName': true,
        'audioBitrate': 96000, // bits per second
        'samplesPerPacket': 960
      },
      // Default values (can be changed by passing a query parameter of the same name)
      'defaults': {
        // Connect Dialog
        'address': window.location.hostname,
        'port': '443/mumble',
        'token': '',
        'username': 'Gast'+getRandomInt(99),
        'password': '',
        'webrtc': true,
        'joinDialog': false, // replace whole dialog with single "Join Conference" button
        'matrix': false, // enable Matrix Widget support (mostly auto-detected; implies 'joinDialog')
        'avatarurl': '', // download and set the user's Mumble avatar to the image at this URL
        // General
        'theme': 'MetroMumbleDark'
      }
};

/***/ })

/******/ });
//# sourceMappingURL=config.js.map