DoubangoTelecom / sipml5

The world's first HTML5 SIP client (WebRTC)
BSD 3-Clause "New" or "Revised" License
939 stars 456 forks source link

Works fine in Firefox 56, but no audio in 58 or chrome #305

Open spikeon opened 6 years ago

spikeon commented 6 years ago

No errors, browser says that it's accessing the speaker and the microphone, but no sound is coming out of my speakers.

This is an internal app with no outside access, so I can't link to it.

Using API Version: 2.1.4

Javascript

'use strict';

var sipStack = void 0;
var session = void 0;
function createSipStack() {
    sipStack = new SIPml.Stack({
        realm: 'URL_HERE', // mandatory: domain name
        impi: '100', // mandatory: authorization name (IMS Private Identity)
        impu: 'sip:100@URL_HERE', // mandatory: valid SIP Uri (IMS Public Identity)
        password: '100', // optional
        websocket_proxy_url: 'wss://URL_HERE:8089/ws', // optional
        enable_rtcweb_breaker: false,
        events_listener: { events: '*', listener: function listener(e) {
                // Events Listener Here
                console.info('stack event = ' + e.type);
                if (e.type === "started") {
                    onStackStart();
                }
            } }, // optional: '*' means all events
        ice_servers: [{ url: 'stun:stun.l.google.com:19302' }],
        sip_headers: [// optional
        { name: 'User-Agent', value: 'IM-client/OMA1.0 sipML5-v1.0.0.0' }, { name: 'Organization', value: 'Doubango Telecom' }]
    });
}

function onStackStart() {
    session = sipStack.newSession('call-audio', {
        audio_remote: document.getElementById('audio-remote'),
        events_listener: { events: '*', listener: function listener(e) {
                // Events Listener Here
                console.info('stack event = ' + e.type);
            } } // optional: '*' means all events
    });
}

var readyCallback = function readyCallback(e) {
    createSipStack(); // see next section
    sipStack.start();
};
var errorCallback = function errorCallback(e) {
    console.error('Failed to initialize the engine: ' + e.message);
};

SIPml.init(readyCallback, errorCallback);

(function ($) {
    $(window).load(function () {
        setTimeout(function () {
            alert("dialing 999");session.call("999");
        }, 1000);
    });
})(jQuery);
//# sourceMappingURL=client-sip.js.map

HTML:

<head>
    ....
    <script src='js/SIPml-api.js?v=2.1.4'></script>
</head>
<body class="cycle">
    <audio id="audio-remote" autoplay="autoplay"> </audio>
    ...
</body>

Console Log Output ( with url's and IP's stripped ) console.log.txt

spikeon commented 6 years ago

Also, as a side note, the demo doesn't work in these browsers either.

spikeon commented 6 years ago

It does, however, work in the latest version of Opera

Edit: It worked ONCE in opera, the first time, and now it doesn't work. No code changes.

TayyabTalha commented 6 years ago

Having same issue with chrome even chrome to chrome call is not working.

spikeon commented 6 years ago

I would like to mention that this has something to do with my computer. Running it on other computers it works fine every time, but on this one desktop it doesn't work. I'll provide a list of my chrome extensions in case that helps.

image