PSA: Behavior change to PeerConnection.createOffer constraint OfferToReceiveAudio

546 views
Skip to first unread message

Jiayang Liu

unread,
Aug 13, 2014, 5:24:52 PM8/13/14
to discuss...@googlegroups.com, webrtc-eng
I'm going to submit a change (https://webrtc-codereview.appspot.com/16309004/) to change the behavior of RTCPeerConnection.createOffer. 
The change is expected to be included in Chrome M39.

What's changed:

Currently if the OfferToReceiveAudio constraint is not specified in PeerConnection.createOffer, the resulted offer SDP will have an "m=audio" line even if there is no audio track attached to the PeerConnection. In other words, OfferToReceiveAudio defaults to true.

After my change, OfferToReceiveAudio no longer defaults to true. Whether the offer SDP has an "m=audio" line depends on if any audio track has been attached to the PeerConnection.

What's not changed:

The behavior of setting an explicit value for OfferToReceiveAudio remains the same, i.e. OfferToReceiveAudio:true will result in an "m=audio" line regardless of the existence of audio tracks; OfferToReceiveAudio:false will result in no "m=audio" line regardless of the existence of audio tracks, unless setLocalDescription has been called with an SDP containing an "m=audio" line, in which case the new offer SDP will mark the audio content inactive instead of removing the audio content.

Please let me know if you have any questions or concerns.

Thanks!
Reply all
Reply to author
Forward
0 new messages