this happends since google chrome version 89 and same thing in Microsoft Edge
1 Like
Does anyone had a fix or workaround for this?
this worked for me, chrome 97 !!!
so we edit webRtcPlayer.js under Config section
this.cfg = parOptions.peerConnectionOptions || {};
this.cfg.sdpSemantics = 'unified-plan';
this.pcClient = null;
this.dcClient = null;
this.tnClient = null;
this.sdpConstraints = {
offerToReceiveAudio: 1,
offerToReceiveVideo: 1
};
// Temporary hotfix for Chrome >=89
const tempChromeInfo = navigator.userAgent.match( /Chrom(e|ium)\/([0-9]+)\./ );
if ( tempChromeInfo )
{
const tempVersion = parseInt( tempChromeInfo[ 2 ], 10 );
if ( tempVersion >= 89 )
{
this.cfg.offerExtmapAllowMixed = false;
}
}
AND THEN
edit app.js
function setupWebRtcPlayer(htmlElement, config)
{
webRtcPlayerObj = new webRtcPlayer({ peerConnectionOptions: config.peerConnectionOptions });
htmlElement.appendChild(webRtcPlayerObj.video);
htmlElement.appendChild(freezeFrameOverlay);
webRtcPlayerObj.onWebRtcOffer = function (offer)
{
if (ws && ws.readyState === WS_OPEN_STATE) {
offer.sdp = offer.sdp.replace("a=extmap-allow-mixed\r\n", "")
let offerStr = JSON.stringify(offer);
console.log(`-> SS: offer:\n${offerStr}`);
ws.send(offerStr);
}
};
1 Like