Separating audio and video capabilities #81

aboba opened this Issue May 9, 2014 · 1 comment


None yet

2 participants

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 ();

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 robin-raymond pushed a commit to robin-raymond/ortc that referenced this issue May 14, 2014
Robin Raymond - ICE restart explanation added, as described in Issue 59

-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