W3C home > Mailing lists > Public > public-webrtc@w3.org > January 2016

[webrtc-pc] getSenders/getReceivers: optional kind parameter?

From: Philipp Hancke via GitHub <sysbot+gh@w3.org>
Date: Fri, 29 Jan 2016 19:41:14 +0000
To: public-webrtc@w3.org
Message-ID: <issues.opened-129863384-1454096473-sysbot+gh@w3.org>
fippo has just created a new issue for 
https://github.com/w3c/webrtc-pc:

== getSenders/getReceivers: optional kind parameter? ==
while playing with simulcast I noticed that neither 
[getSenders](http://w3c.github.io/webrtc-pc/#widl-RTCPeerConnection-getSenders-sequence-RTCRtpSender)
 nor 
[getReceivers](http://w3c.github.io/webrtc-pc/#widl-RTCPeerConnection-getReceivers-sequence-RTCRtpReceiver)
 (and getTransceivers?) takes a 'kind' member specifying the media 
type.

What I was originally looking to do was along the lines of
```
pc.getSenders('video')[0].setParameters(...)
```
to configure simulcast on the first video track. Trivial to work 
around by using .filter on the array of senders returned:
```
pc.getSenders().filter(function(sender) { return sender.track.kind ===
 'video'; })[0]
.setParameters(...)
```

But since 
[getCapabilities](http://w3c.github.io/webrtc-pc/#widl-RTCRtpReceiver-getCapabilities-RTCRtpCapabilities-DOMString-kind)
 takes an optional kind parameter that seems slightly inconsistent.


Please view or discuss this issue at 
https://github.com/w3c/webrtc-pc/issues/488 using your GitHub account
Received on Friday, 29 January 2016 19:41:16 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:47 UTC