Closed fippo closed 5 years ago
describe('rejects a legacy datachannel offer', () => { ... it.only('in setRemoteDescription with a local track', () => { // test that we don't forget about the track. return navigator.mediaDevices.getUserMedia({audio: true}) .then((stream) => { pc.addTrack(stream.getTracks()[0], stream); return pc.setRemoteDescription({type: 'offer', sdp: sdp}); }) .then(() => pc.createAnswer()) .then((answer) => pc.setLocalDescription(answer)) .then(() => pc.createOffer()) .then((offer) => { const sections = SDPUtils.getMediaSections(offer.sdp); expect(sections).to.have.length(2); expect(SDPUtils.isRejected(sections[0])).to.equal(true); expect(SDPUtils.kind(sections[1])).to.equal('audio'); }); });
This does weird stuff in createOffer, creating an ice gatherer for the rejected m-line and then failing.
This does weird stuff in createOffer, creating an ice gatherer for the rejected m-line and then failing.