Open fippo opened 5 years ago
it.only('...', () => { const sdp = SDP_BOILERPLATE + 'm=application 9 DTLS/SCTP 5000\r\n' + 'c=IN IP4 0.0.0.0\r\n' + 'a=ice-ufrag:' + ICEUFRAG + '\r\n' + 'a=ice-pwd:' + ICEPWD + '\r\n' + 'a=fingerprint:sha-256 ' + FINGERPRINT_SHA256 + '\r\n' + 'a=setup:actpass\r\n' + 'a=mid:data\r\n' + 'a=sctpmap:5000 webrtc-datachannel 1024\r\n'; const pc = new RTCPeerConnection(); pc.setRemoteDescription({type: 'offer', sdp}) .then(() => pc.createAnswer()) .then((answer) => pc.setLocalDescription(answer)) .then(() => pc.createOffer()) .then((offer) => console.log(offer.sdp)) });
throws
(node:31948) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'getLocalParameters' of undefined at module.exports (/home/fippo/webrtc/wicked/writemediasection.js:21:31)
createOffer should skip over rejected datachannel m-lines the same way createAnswer does.
potentially #166 in disguise
throws
createOffer should skip over rejected datachannel m-lines the same way createAnswer does.