Pixel streaming chrome 94 offerExtmapAllowMixed

Hi,

A few months ago we had to add an option “offerExtmapAllowMixed” to our signalling server to workaround an issue with Chrome not working with pixel streaming.

This worked fine, until Chrome 94, which no longer accepts “offerExtmapAllowMixed” sent to it.

https://chromiumdash.appspot.com/commit/9749ed1096b468117523dcfea7a11e48230912b7

So now I have to remove that setting or it causes the Unreal app to crash (ie the build unreal game.exe)

With the option remove I see this error in the Unreal app log:

PixelStreamingWebRTC: Error: (webrtcsdp.cc:370): Failed to parse: “a=extmap-allow-mixed”. Reason: Expects at least 2 fields.

This is using the Pixel Streaming plugin got Unreal 4.25.

I need to test 4.26.2 and but I wondered if anyone else had the same issue and how you worked around it.

1 Like

If this option is removed, developers can still modify the SDP and remove the ‘a=extmap-allow-mixed\r\n’ line during signalling which is allowed by the specification.

The adapter.js polyfill has been providing an implementation of this on the receiving end for a while:

https://github.com/webrtcHacks/adapter/blob/master/src/js/common_shim.js#L319

I’m not a front-end programmer. So I can’t understand what this code is saying.

1 Like

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

We seem to be in the exact same situation (made a fix back in March, and now also experiencing this problem with Chrome 94 update). We tried updating 4.27 version of the Signalling Web Server, but that didn’t seem to work for us but we didn’t do a full merge. We are going to attempt that now. Sorry we don’t have a work around, and hoping the community will help out!

We also tried the SS from 4.27 with no luck. The issue, as I understand it now, is that the Unreal WebRTC implementation in 4.26.x and below is incompatible with Chrome (and also Edge, as it is actually an incompatibility with Chromium).

We tested 4.27 Unreal itself which contains a later pixel streaming plugin with an upgraded WebRTC, and it works fine (inc the SS that comes with 4.27)

However, I am going to test the workaround on 4.26.2 first, as posted by wotou2k21, to see if that fixes it for now.

Thanks. The workaround fixed the issue.

Just for peoples info, the function code has been pasted with a missing
};
at the end of the function.

And when I pasted it into VSC it added spaces and incorrect single quotes due to copy/paste conversion. Once I fixed that it worked.

Epic have given us an official workaround. You need to add this line to the webRtcPlayer.js file in the signalling server.

offer.sdp = offer.sdp.replace(/(a=extmap-allow-mixed)\r\n/gm, “”);

This is around line 125, so you end up with this block (apologies for bad formatting):

handleCreateOffer = function (pc) {
pc.createOffer(self.sdpConstraints).then(function (offer) {
pc.setLocalDescription(offer);
if (self.onWebRtcOffer) {
// (andriy): increase start bitrate from 300 kbps to 20 mbps and max bitrate from 2.5 mbps to 100 mbps
// (100 mbps means we don’t restrict encoder at all)
// after we setLocalDescription because other browsers are not c happy to see google-specific config
offer.sdp = offer.sdp.replace(/(a=fmtp:\d+ .level-asymmetry-allowed=.)\r\n/gm, “$1;x-google-start-bitrate=10000;x-google-max-bitrate=20000\r\n”);
offer.sdp = offer.sdp.replace(/(a=extmap-allow-mixed)\r\n/gm, “”);
self.onWebRtcOffer(offer);
}
},
function () { console.warn(“Couldn’t create offer”) });
}