Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createOffer should ignore rejected datachannel transceivers #178

Open
fippo opened this issue Dec 4, 2018 · 1 comment
Open

createOffer should ignore rejected datachannel transceivers #178

fippo opened this issue Dec 4, 2018 · 1 comment

Comments

@fippo
Copy link
Member

fippo commented Dec 4, 2018

  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.

@fippo
Copy link
Member Author

fippo commented Dec 4, 2018

potentially #166 in disguise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant