It’s been a long time since I took a close look at Firefox in terms of the WebRTC API offered. To be honest, Firefox isn’t the browser I use to develop and therefore to surf the net. The two are unrelated, but as I’m always developing, I use a single browser for everything…
And for WebRTC, I mainly use Chrome to test new APIs or to build prototypes, and when I need to do demos, I rely on WebRTC Adapter or I’ve got into the habit of doing less on other browsers which is not really cool!
So, while I’m working on the second edition of my WebRTC API map (which should be the subject of my next post), I’ve been using my WebRTC API Graph tool to see what’s changed in the WebRTC field.
I was pleasantly surprised to see so many changes. So I went to the Firefox Release Notes for Developers pages to get additional information on the changes I saw in the browser.
And hopefully, Firefox has good release notes which allowed me to find my happiness 😎
Firefox is updated every 4 weeks. In 2023, the first version landed on January 17 (Firefox 109), while the last is scheduled for December 19 (Firefox 121).
If I’m counting right, in 2023, Mozilla will release 13 versions of Firefox.
At the time of writing, 11 versions have been released, and of these 11, 9 have WebRTC enhancements.
Here are the main themes being worked on in Firefox over the course of 2023:
Support for missing methods and properties of “ORTC” API such as in RTCRtpSender
, and RTCRtpReceiver
Support for missing stats reports such as RTCMediaSourceStats
, RTCPeerConnectionStats
Support for the Compression Streams API
Support for the WebTransport API
RTCPeerConnection.connectionState 😵
Support for the Audio Output Devices API and with the use of a new dedicated API selectAudioOutput()
🥳
Support for the WebRTC Encoded Transforms
Note: connectionState
and setSinkId
: It’s so good to finally see these APIs supported on Firefox!
Note: setSinkId
is still not supported on Safari… 😫
I took all the release notes and extracted the content around WebRTC. Here are the notable changes
WebTransport.createBidirectionalStream()
and WebTransport.createUnidirectionalStream()
(Firefox bug 1816925).RTCRtpTransceiver.currentDirection
and RTCRtpTransceiver.direction
properties now support the “stopped” value for indicating whether a transceiver has stopped. This value should now be used instead of the deprecated RTCRtpTransceiver.stopped
property (Firefox bug 1568296).RTCPeerConnection.getTransceivers()
now omits stopped transceivers. Similarly, RTCPeerConnection.getReceivers()
and RTCPeerConnection.getSenders()
omit the receivers and senders associated with a stopped transceiver (Firefox bug 1568296).ReadableStream.from()
static member is now supported, allowing developers to construct a readable stream from any iterable or async iterable object (Firefox bug 1772772).TransformStream
running in a worker. The supported interfaces include: RTCRtpScriptTransform
, RTCRtpScriptTransformer
, RTCRtpSender.transform
, RTCRtpReceiver.transform
, RTCEncodedVideoFrame
, and RTCEncodedAudioFrame
, and the RTCTransformEvent
and worker rtctransform
event (Firefox bug 1631263).MediaDevices.selectAudioOutput()
, MediaDevices.enumerateDevices()
, HTMLMediaElement.setSinkId()
, HTMLMediaElement.sinkId
, and the permission policy Permissions-Policy: speaker-selection (Firefox bug 1498512).WebTransport
, WebTransportBidirectionalStream
, WebTransportDatagramDuplexStream
, WebTransportReceiveStream
, WebTransportDatagramDuplexStream
and WebTransportError
. For more information see Firefox bug 1692754, Firefox bug 1818754, and Firefox bug 1791835.CanvasRenderingContext2D.reset()
and OffscreenCanvasRenderingContext2D.reset()
are now supported, and can be used to return the associated rendering context to its default state. (Firefox bug 1709347).RTCRtpSender.getCapabilities()
, RTCRtpReceiver.getCapabilities()
, RTCRtpSender.setStreams()
, RTCSctpTransport
& RTCPeerConnection.sctp
, RTCMediaSourceStats
, RTCPeerConnection.connectionState
, and RTCPeerConnectionStats. The corresponding bug reports are, respectively: Firefox bug 1531460, Firefox bug 1531461, Firefox bug 1510802, Firefox bug 1278299, Firefox bug 1804678, Firefox bug 1265827, and Firefox bug 1531087)mozRTCPeerConnection
, mozRTCIceCandidate
, and mozRTCSessionDescription
were permanently removed (Firefox bug 1531812).navigator.getAutoplayPolicy()
is now supported, allowing developers to configure autoplay of media elements and audio contexts based on whether autoplay is allowed, disallowed, or only allowed if the audio is muted. See Firefox bug 1773551 for more details.RTCInboundRtpStreamStats.trackIdentifier
is now supported. This allows developers to associate inbound-rtp
statistics with a particular track when using RTCPeerConnection.getStats()
. (For more information see Firefox bug 1804676).navigator.permissions.query()
(Firefox bug 1772166).ReadableStream
now supports asynchronous iteration over the chunks in a stream using the for await…of syntax (Firefox bug 1734244).RTCPeerConnection.addTransceiver()
now supports using the sendEncodings option in the init parameter object, and RTCRtpEncodingParameters.active
can be used to determine whether or not the encoding is being used to send data. (See Firefox bug 1676855 for more details.)RTCRtpSender.getParameters()
, RTCRtpSender.setParameters()
, and RTCRtpReceiver.getParameters()
are now compliant with the specification (Firefox bug 1401592).Firefox seems to be catching up with WebRTC, which is very good news: interoperability will be easier and the user experience should be more similar from one browser to another.
The year 2024 should get off to a great start! But as 2023 isn’t over yet, I hope to see more WebRTC changes in the upcoming November and December releases!
And you, how is your WebRTC experience with Firefox?