pion / webrtc

Pure Go implementation of the WebRTC API
https://pion.ly
MIT License
13.66k stars 1.65k forks source link

Pion WebRTC v4 doesn't work with sfu-ws on Firefox #2888

Closed okyanusoz closed 6 days ago

okyanusoz commented 1 month ago

I'm not sure where to file this bug, so I'm filing it here.

If you try running the sfu-ws sample here and change it to use Pion WebRTC v4 instead: import ( //... "github.com/pion/webrtc/v4" )

It will work on Chrome, but not Firefox. Specifically, it works with 2 participants but not more for some reason. It worked with v3.

Your environment.

What did you do?

Try using Pion WebRTC v4 with sfu-ws or any other SFU-like app.

What did you expect?

I expected 3 participants to work. Instead, one participant successfully connect, but others just freeze or slow down significantly.

What happened?

Taking a look at about:webrtc-internals shows this:

Screenshot 2024-08-25 at 20 01 56

As you can see, only one participant is able to both send and receive VP8 when we have 3 participants.

A full report from a peer who froze is below: debug.json

Thanks!

Sean-Der commented 6 days ago

Sorry I didn't solve this sooner @okyanusoz!

pion/webrtc@v4 enables Simulcast by default. Pion uses different default values for extension headers. This meant that Pion was sending packets with invalid receiever feedback and breaking FireFox's bandwidth estimation