W3C home > Mailing lists > Public > public-webrtc@w3.org > February 2016

Section 5.2.4: Definition of Active for an RTCRtpReceiver

From: Bernard Aboba <Bernard.Aboba@microsoft.com>
Date: Thu, 11 Feb 2016 17:34:07 +0000
To: "public-webrtc@w3.org" <public-webrtc@w3.org>
CC: Peter Thatcher <pthatcher@google.com>
Message-ID: <BLUPR03MB1497EC7A8A423973A3DD3E2ECA80@BLUPR03MB149.namprd03.prod.outlook.com>
Github Issue: https://github.com/w3c/webrtc-pc/issues/473

Currently, Section 5.2.4 defines the active attribute as follows:

active of type boolean
Indicates that this encoding is actively being sent. Setting it to false causes this encoding to no longer be sent. Setting it to true causes this encoding to be sent.

The question has now arisen as to whether in an RTCRtpReceiver there is an equivalent of the active attribute and if so, how to access it.

While the RTCRtpSender object includes getParameters() and setParameters() methods, there are no equivalent methods for the RTCRtpReceiver object.

Currently, RTCRtpTransceiverInit includes the boolean send and receive attributes:

dictionary RTCRtpTransceiverInit {

             boolean                            send = true;

             boolean                            receive = true;

             sequence<MediaStream<https://www.w3.org/TR/webrtc/#dfn-mediastream>>              streams;

             sequence<RTCRtpEncodingParameters> sendEncodings;


If the receive attribute is to set to true, this indicates that the RTCRtpReceiver will offer to receive RTP and will receive RTP if the remote peer accepts.
Similarly, if the receive attribute is set to false, this implies that the RTCRtpReceiver will not offer to receive RTP and will not receive RTP.

Therefore it is possible to call addTransceiver() and provide instructions about whether a given m-line will subsequently be set as sendonly/recvonly/sendrecv/inactive within createOffer().

However, once that is done, there does not appear to be an attribute within the RTCRtpReceiver that indicates whether the decoder is set up to receive an incoming stream.
Since there is no getParameters() method for an RTCRtpReceiver, it is not possible to examine whether RTCRtpReceiver.getParameters().encodings[0].active is set to true or false.

It is however possible to examine RTCRtpSender.getParameters().encodings[0].active in order to determine whether init.send was set to true or false (since encodings[0].active should have the same value as send).
Received on Thursday, 11 February 2016 17:34:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:18:13 UTC