Last active
March 28, 2022 09:59
-
-
Save droganaida/d0b23804321ad90764f333d63dd3f95d to your computer and use it in GitHub Desktop.
Find function webRtcPlayerObj.onWebRtcOffer in app.js file, add removeExtmapAllowMixed(offer); in the beginning of IF. Then add function removeExtmapAllowMixed(desc) to remove a=extmap-allow-mixed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
webRtcPlayerObj.onWebRtcOffer = function (offer) { | |
if (ws && ws.readyState === WS_OPEN_STATE) { | |
removeExtmapAllowMixed(offer); | |
let offerStr = JSON.stringify(offer); | |
console.log(`-> SS: offer:\n${offerStr}`); | |
ws.send(offerStr); | |
} | |
}; | |
function removeExtmapAllowMixed(desc) { | |
/* remove a=extmap-allow-mixed for webrtc.org 1 < M71 */ | |
if (!window.RTCPeerConnection) { | |
return; | |
} | |
if(desc.sdp.indexOf('\na=extmap-allow-mixed') !== -1){ | |
const sdp = desc.sdp.split('\n').filter((line) => { | |
return line.trim() !== 'a=extmap-allow-mixed'; | |
}).join('\n'); | |
desc.sdp = sdp; | |
return sdp; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment