Bug 176665 - RTCRtpTransceiver.setDirection does not work
Summary: RTCRtpTransceiver.setDirection does not work
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-10 00:36 PDT by Philipp Hancke
Modified: 2020-02-05 07:37 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hancke 2017-09-10 00:36:36 PDT
take the following code:
```
var pc = new RTCPeerConnection();
navigator.mediaDevices.getUserMedia({audio: true})
.then(stream => {
  pc.addTrack(stream.getAudioTracks()[0], stream);
  pc.getTransceivers()[0].setDirection("sendonly");
  console.log("direction is", pc.getTransceivers()[0].direction);
  return pc.createOffer();
})
.then(offer => {
  console.log(offer.sdp);
})
```
setDirection works, the console log shows "direction is sendonly". However, the offer that is created has a a=sendrecv audio mline.

Similiarly for making a call on https://webrtc.github.io/samples/src/content/peerconnection/pc1/, calling setDirection and then creating a subsequent offer.
Comment 1 Philipp Hancke 2020-02-05 07:37:09 PST
no longer applies presumably due to the switch away from plan-b