Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTCRtpReceiver.getParameters() needed #365

Closed
ibc opened this issue Jan 21, 2016 · 6 comments
Closed

RTCRtpReceiver.getParameters() needed #365

ibc opened this issue Jan 21, 2016 · 6 comments

Comments

@ibc
Copy link
Contributor

ibc commented Jan 21, 2016

Related to #355:

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.

If ORTC does not provide such a getParameters() method, then switching from active:true to active:false and vice-versa becomes very hard given that the user/app should keep the rtp parameters object previously passed to receive() in order to switch the active flag.

@robin-raymond
Copy link
Contributor

Why do we need? is supposed to be identical to what was specified in the send so it would just return what was sent in previously... the danger in adding is the expectation that parameters start getting filled in, like RTP SSRCs, etc... and gathering that would make things async potentially. Unless it just returns what we passed in and then I question its value...

@ibc
Copy link
Contributor Author

ibc commented Jan 21, 2016

In short: IMHO we need a way to enable/disable receiving media in the track. Maybe a setter rtpReceiver.active = boolean.

@robin-raymond
Copy link
Contributor

Change flag in parameters encodings local copy, call send() again with updated structure... ? this is more a way to keep the encodings stable so objects don't get created destroyed while being able to turn on / off a particular encoding.

@ibc
Copy link
Contributor Author

ibc commented Jan 21, 2016

That requires that the user holds the rtpParameters forever somewhere with no reason other than changing a subfield and passing again the entire object to receive() or start(). There is no other reason to keep such a complex rtpParameters object.

That's why a single active setter in both RTCRtpSender and RTCRtpReceiver objects makes sense IMHO.

@ibc
Copy link
Contributor Author

ibc commented Jan 21, 2016

To be more clear: I wouldn't like that my JavaScript ORTC client implementation needs to hold datas such as:

this.rtpReceiversStuff = {
  receiver1: {
    rtpReceiver   : INSTANCE_OF_RTCRtpReceiver,
    rtpParameters : object
  },
  receiver2: {
     [...]
  }
};

@aboba aboba added the 1.1 label Feb 3, 2016
@aboba aboba added the wontfix label Feb 21, 2016
@aboba aboba closed this as completed Feb 29, 2016
@ibc
Copy link
Contributor Author

ibc commented Feb 29, 2016

While I may agree with the negative to rtpReceiver.getParameters(), don't you agree that we deserve a simpler way for enabling/disabling a RTCRtpSender/RTCRtpReceiver without having to provide the entire RTCRtpParameters again? I mean:

rtpSender.pause();
rtpSender.resume();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants