stripSDP: filter a=max-message-size and fix line-endings for cross-browser compat
All checks were successful
Pin to IPFS / pin (push) Successful in 13s

This commit is contained in:
Niels Göttsch 2026-06-14 19:24:01 +02:00
parent 7266cdcc0e
commit b51169b545
No known key found for this signature in database
GPG key ID: E325AC85B57E4370

View file

@ -72,7 +72,8 @@ function hexToBuf(hex) {
/* ─── QR compression: deflate-raw + base45 ─── */ /* ─── QR compression: deflate-raw + base45 ─── */
function stripSDP(sdp) { function stripSDP(sdp) {
return sdp.split('\r\n').map(line => { return sdp.split(/\r?\n/).map(line => {
if (line === '' || line.startsWith('a=max-message-size:')) return null;
if (!line.startsWith('a=candidate:')) return line; if (!line.startsWith('a=candidate:')) return line;
const parts = line.split(' '); const parts = line.split(' ');
if (parts[2] === 'tcp') return null; if (parts[2] === 'tcp') return null;