Section 5.2.4: Definition of Active for an RTCRtpReceiver

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