Skip to content
This repository was archived by the owner on May 11, 2025. It is now read-only.
This repository was archived by the owner on May 11, 2025. It is now read-only.

createOffer should ignore rejected datachannel transceivers #178

@fippo

Description

@fippo
  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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions