I’m testing a small app that I made with mediasoup and am streaming from a laptop using Safari to a desktop running Chrome over a local WIfi network. It works pretty well though every now and then there are small stutters in the video or even noticeable hickups of 1-3s.
I’ve noticed that when these happen, the simulcast layers drop down from 2/2 (spatial/temporal) to usually 1/0 and then within a few milliseconds to 1/2. After a good while they go back to 2/2. Sometimes the drop goes even to 0/0, then pretty much immediately to 0/2 and then after a while climes back to 2/2. The drops are always followed with a bump up in the temporal layer within a few dozen ms.
First I thought it might have something to do with BWE but using the trace events it seems that no drop in bandwidth was detected. Available BW is always higher than desired BW. I then looked at the consumer getStats() output and noticed that there are a few dropped packets. I ran ping probes both from the laptop to the desktop as well as back but in both directions they show no packetloss whatsoever. I then tried to broadcast using Firefox and there the hickups or layer changes don’t seem to happen but I noticed FF was not sending the full 720p as Safari did. In fact it changed the resolution itself without changing layers or visible stutters.
So I’m not sure what to look at next. I didn’t spot any errors anywhere.
One other thing I noticed that after a good while the Safari client actually showed a transport: connectionstatechange = disconnected event but the stream kept on going just fine on the receiver side. The transport never recovered from this. Should I restart the ICE state when that happens?