muaz-khan / WebRTC-Experiment

WebRTC, WebRTC and WebRTC. Everything here is all about WebRTC!!
https://www.webrtc-experiment.com/
MIT License
11.72k stars 3.95k forks source link

conference-ui issue #122

Open blckspder opened 10 years ago

blckspder commented 10 years ago

Hello,

We were using one of your older scripting conference-ui.js. We setup our own turn server and our own firebase account. Suddenly about 2 weeks ago the script stopped working properly. The signaling works correctly to display an active room and to join it. But now only one video feed is showing. Any ideas as to what has changed? Or recommendations as how to update or what to update to to correct the issue?

Other than that your scripts have been great!

Thanks for your help.

muaz-khan commented 10 years ago

Video Conferencing demo seems working fine. You need to upgrade RTCPeerConnection-v1.5.js.

Actually, following function is removed:

function getInteropSDP(sdp) {
    var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''),
        extractedChars = '';

    function getChars() {
        extractedChars += chars[parseInt(Math.random() * 40)] || '';
        if (extractedChars.length < 40)
            getChars();

        return extractedChars;
    }

    // usually audio-only streaming failure occurs out of audio-specific crypto line
    // a=crypto:1 AES_CM_128_HMAC_SHA1_32 --------- kAttributeCryptoVoice
    if (options.onAnswerSDP)
        sdp = sdp.replace(/(a=crypto:0 AES_CM_128_HMAC_SHA1_32)(.*?)(\r\n)/g, '');

    // video-specific crypto line i.e. SHA1_80
    // a=crypto:1 AES_CM_128_HMAC_SHA1_80 --------- kAttributeCryptoVideo
    var inline = getChars() + '\r\n' + (extractedChars = '');
    sdp = sdp.indexOf('a=crypto') == -1 ? sdp.replace(/c=IN/g,
        'a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:' + inline +
        'c=IN') : sdp;

    return sdp;
}
blckspder commented 10 years ago

Thanks! I updated my RTCPeerConnection-v1.5.js and everything is working again!!!