-
Notifications
You must be signed in to change notification settings - Fork 115
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
Should media capabilities influence what is exposed in what is exposed in WebRTC offers and answers #2929
Comments
As an example, HEVC codec would not be exposed by default in getCapabilities/SDP. |
@henbos At one point, you noticed that I am wondering if the same effect is seen with MediaCapabilities. |
I believe #2925 would help in resolving this issue - hiding specialist codecs until they are asked for would reduce the scope of privacy exposure. |
So in the terminology of #2925, we should say that "if a codec is queried for WebRTC usage, it should be enabled for (sending/receiving)? |
To be clear, my 2-week-old comment was intended to say "no" unless we add a flag to the request desiring this behavior. |
AIUI, you are suggesting to have an explicit opt-in somewhere, which sounds reasonable. |
If we merge w3c/media-capabilities#186 (return RTCRtpCodecCapability when querying for "webrtc"), a minimal API change would be to allow adding this codec description to setParameters() and setCodecPreferences(), thereby enabling the codec. |
Discussion on WG call Feb 20, 2024: Support for idea, should be worked into a proposal. |
This issue had an associated resolution in WebRTC February 2024 meeting – 20 February 2024 (Should media capabilities influence what is exposed in what is exposed in WebRTC offers and answers #2929):
|
Assuming we finalise w3c/media-capabilities#186, we would use On WebRTC side, API wise, there could be different approaches:
3 has no API overhead which is nice. @alvestrand, thoughts? |
Since we're now declaring that codec definitions (and their enabled status) are per-sender/receiver properties, I think #1 is the best approach. Similarly, RTCRtpReceiver.SetCodecPreferences(new codecs) should be enough API surface for the receiver - if you're not going to announce that you can receive it, why bother? In retrospect, it was probably a mistake to put SetCodecPreferences() on the transceiver. (2 is a bad idea because it goes at cross purposes with the idea of deriving codecs from installed transform. 3 is a bad idea because setCodecPreferences() isn't defined to touch the sender.) |
Oh option 1 is slightly unclear. It seems you are talking of option 3 (per transceiver/sender/receiver instance). |
Aha, I did not read that carefully enough. Yes, I think we need to preserve the independence of PeerConnections - if there are two libraries on a page both using PeerConnection, leaking the fact that one of them is enabling a specific codec to the other one would come as an unwelcome surprise for both of them. |
WebRTC implementations currently tend to expose the whole list of codecs that are available. On contrary media capabilities is telling whether a particular codec is supported.
For some codecs, like VP8, VP9 and H264, it might be fine in terms of privacy since most UAs support them.
For newer codecs though, it is an actual issue.
Maybe what WebRTC exposes in terms of codecs should be based on what MC already exposed to the web page, in addition to the base offering that has no privacy issues.
This could apply to offers as well as receiver/sender getCapabilities.
The text was updated successfully, but these errors were encountered: