What does RTCRtpEncodingParameters.active=false in a RtpReceiver? #355

Closed
ibc opened this Issue Jan 16, 2016 · 4 comments

Projects

None yet

2 participants

@ibc
Contributor
ibc commented Jan 16, 2016

active of type boolean, defaulting to true
Whether the sender or receiver is active. If false, don't send any media right now.

If I call rtpReceiver.receive() with encodingParameters.active: false, what happens? Does it means that incoming media is not given to the associated MediaStreamTrack?

If so, the spec should clarify it better.

@aboba
Contributor
aboba commented Jan 18, 2016

I have also filed this issue against WebRTC 1.0: w3c/webrtc-pc#473

@ibc
Contributor
ibc commented Jan 18, 2016

This should be placed into a different issue, but maybe I miss something:

When rtpSender.send(params) is called with encodingParameters.active: false no media is sent. However, in order to activate it there is no proper setter or method in the RTCRtpSender class, so it seems that the user should call send() again with same params as before but, in this case, with encodingParameters.active: true.

Isn't this to hard for a common usage in which we just want to switch on/off (pause/resume) media sending? Or is this feature (pause/resume sending) supposed to be handled within the MediaStreamTrack itself? If so, why do we need this active setting?

@aboba
Contributor
aboba commented Jan 19, 2016

Yes, to stop sending an encoding, call send() with parameters.encodings[j].active set to "false". Setting active to "true" and calling send() again will start sending again.

In WebRTC 1.0, getParameters() is used to retrieve RTCRtpParameters, and then setParameters() can be used with active set to "false" or "true" to accomplish the same thing.

@aboba aboba added a commit that referenced this issue Jan 19, 2016
@aboba aboba Definition of Active for an RTCRtpReceiver
Fix for ORTC Issue #355
Related WebRTC 1.0 PR: w3c/webrtc-pc#475
a52c875
@aboba aboba added PR exists and removed to-do-next-draft labels Jan 19, 2016
@ibc
Contributor
ibc commented Jan 21, 2016

Thanks. I will open a new issue then regarding the lack of such a getParameters().

@aboba aboba closed this Feb 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment