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

Separating audio and video capabilities #81

aboba opened this issue May 9, 2014 · 1 comment

Separating audio and video capabilities #81

aboba opened this issue May 9, 2014 · 1 comment


Copy link

@aboba aboba commented May 9, 2014

Currently, getCapabilities is defined as follows:

partial interface RTCRtpSender {
static RTCRtpCapabilities getCapabilities ();

partial interface RTCRtpReceiver {
static RTCRtpCapabilities getCapabilities ();

The implication is that getCapabilities() returns both audio and video capabilities in a single RTCRtpCapabilities object.

However, if getCapabilities wasn't defined as static, then it could return only capabilities of the appropriate kind:

For example, with respect to the RTCRtpSender object, it could work this way:

var audioSender = new RTCRtpSender(audioTrack, transport);
var videoSender = new RTCRtpSender(videoTrack, transport);
rtpAudioSendCaps = audioSender.getCapabilities();
rtpVideoSendCaps = videoSender.getCapabilities();

With the RTCRtpReceiver object, it could work this way:

   var audioReceiver = new RTCRtpReceiver(transport);
   var videoReceiver = new RTCRtpReceiver(transport);
   rtpAudioRecvCaps = audioReceiver.getCapabilities("audio"); 
   rtpVideoRecvCaps = videoReceiver.getCapabilities("video"); 

The advantage of doing it this way is that a subsequent call to createParameters could be more specific:

var audioRecvParams = RTCRtpReceiver.createParameters(
"audio", remote.rtpAudioSendCaps);
var videoRecvParams = RTCRtpReceiver.createParameters(
"video", remote.rtpVideoSendCaps);

So an alternative would be as follows:

partial interface RTCRtpReceiver {
RTCRtpCapabilities getCapabilities (DOMString kind);

partial interface RTCRtpSender {
RTCRtpCapabilities getCapabilities ();

Copy link
Contributor Author

@aboba aboba commented May 10, 2014

Suggestion from Peter Thatcher:

I'd be happy with

.getCapabilities() => returns combined audio+video capabilities
.getCapabilities("audio") => returns audio capabilities
.getCapabilities("video") => returns video capabilities

robin-raymond pushed a commit to robin-raymond/ortc that referenced this issue May 14, 2014

-Fixes for error handling, as described in Issue 75

- Fixes for miscellaneous NITs, as described in Issue 76

- Enable retrieval of the SSRC to be used by RTCP, as described in Issue 77

- Support for retrieval of audio and video capabilities, as described in Issue 81

- getStats interface updated, as described in Issue 82

- Partially addressed SVC issues described in Issue 83

- Partially addressed statistics update issues described in Issue 85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants