jlaine / aiortc-wpt-demo

1 stars 2 forks source link

send packets and add a NACK test #5

Closed fippo closed 3 years ago

fippo commented 3 years ago

Not sure I like the current "protocol" of switching the encoding from json to binary. This won't work with datachannel things I think. Sending packets as JSON with type "rtp", "rtcp", "data" might be the way forward..

@nils-ohlmeier: I get a nackCount of 2 in Firefox which increases to six if I send the NACK three times. Looks like you have a stats bug? ;-)

fippo commented 3 years ago

(note: oddly the firefox issue only shows up when increasing the timeout to 1000ms)

nils-ohlmeier commented 3 years ago

@na-g any idea what could cause twice the NACKs reported in FF stats?

I'm starting to wonder if this is related to us passing RTCP to all receivers.

jlaine commented 3 years ago

Not sure I like the current "protocol" of switching the encoding from json to binary. This won't work with datachannel things I think. Sending packets as JSON with type "rtp", "rtcp", "data" might be the way forward..

You don't have to set the encoding attribute by the way:

https://www.starlette.io/endpoints/#websocketendpoint

fippo commented 3 years ago

not perfectly happy with the test -- currently it relies on payload type asymmetry, i.e. if the answer says "vp8 100 rtx 101" the browser will send on those payload types.

Having a way (endpoint?) to do setRemoteDescription(type=offer) first would be good. Merging anyway.