When chrome 94 pixel streaming crash in ue 4.26

//to line 382 of “PixelStreaming\SignallingWebServer\scripts\app.js”

webRtcPlayerObj.onWebRtcOffer = function (offer) {
   if (ws && ws.readyState === WS_OPEN_STATE) {

         //add this line
  	removeExtmapAllowMixed(offer);
  	let offerStr = JSON.stringify(offer);
  	console.log(`-> SS: offer:\n${offerStr}`);
  	ws.send(offerStr);
  }
};

//add fun

function removeExtmapAllowMixed(desc) {
  /* remove a=extmap-allow-mixed for webrtc.org < 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;
}
1 Like