webrtcHacks / adapter

Shim to insulate apps from spec changes and prefix differences. Latest adapter.js release:

Home Page:https://webrtcHacks.github.io/adapter/adapter-latest.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Firefox is missing getCapabilities() on RTCRtpSender/RTCRtpReceiver

JSmith01 opened this issue · comments

Versions affected

Firefox up to 105 version
adapter.js up to 8.1.2

Description

Firefox is missing getCapabilities() on RTCRtpSender/RTCRtpReceiver. It could be polyfilled but it would require async set of this method - proposed way is to parse generated offer to provide the API. I've prepared draft version for the polyfill, and could prepare PR if it's ok to have async polyfill initialization. The demo code is here - https://gist.github.com/JSmith01/2be86bc242d3c2b1c4a95cd3eedde239

I remember discussing that a couple of times but I can't find any public mention of this.
Apart from requiring a different pattern (async initialization) it creates and destroys a peerconnection. Now that is a somewhat common pattern but not something a polyfill (which already does too many 😱 things) should do.

getCapabilities in general, due to being a sync API is problematic (see w3c/webrtc-extensions#95) since some codecs can't be enumerated in a synchronous way.

A potential solution to solving that is a per-connection is shown here but nobody found the time to implement or specifiy it yet.

tagging @jan-ivar for actual implementation status