- From: Peter Thatcher <pthatcher@google.com>
- Date: Fri, 9 May 2014 10:57:05 -0700
- To: Bernard Aboba <Bernard.Aboba@microsoft.com>
- Cc: "public-ortc@w3.org" <public-ortc@w3.org>
- Message-ID: <CAJrXDUHq-1RTeyX54333v3Rkf9wDYKZf0oXNNOc2f=iKDZ-dOg@mail.gmail.com>
I think it's nice to be able to get the capabilities without creating a
sender or receiver object first.
I don't really see the advantage of having separate audio/video
capabilities. What things will be audio-only or video-only? The codecs?
The codecs already indicate whether they are audio or video.
On Thu, May 8, 2014 at 10:19 PM, Bernard Aboba
<Bernard.Aboba@microsoft.com>wrote:
> 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:
>
> partial interface RTCRtpReceiver {
> RTCRtpCapabilities getCapabilities (DOMString kind);
> }
>
> partial interface RTCRtpSender {
> RTCRtpCapabilities getCapabilities ();
> };
>
> If it were done this way, with respect to the RTCRtpSender object, it
> would be possible to retrieve audio and video send and receive capabilities
> separately:
>
> var audioSender = new RTCRtpSender(audioTrack, transport);
> var videoSender = new RTCRtpSender(videoTrack, transport);
> rtpAudioSendCaps = audioSender.getCapabilities();
> rtpVideoSendCaps = videoSender.getCapabilities();
>
> With the RTCRtpReceiver object, it would look like this:
>
> var audioReceiver = new RTCRtpReceiver(transport);
> var videoReceiver = new RTCRtpReceiver(transport);
> rtpAudioRecvCaps = audioReceiver.getCapabilities("audio");
> rtpVideoRecvCaps = videoReceiver.getCapabilities("video");
>
> One advantage of separating audio and video capabilities is that
> subsequent calls to createParameters could be more specific:
>
> var audioRecvParams = RTCRtpReceiver.createParameters(
> "audio", remote.rtpAudioSendCaps);
> var videoRecvParams = RTCRtpReceiver.createParameters(
> "video", remote.rtpVideoSendCaps);
>
Received on Friday, 9 May 2014 17:58:13 UTC