Dealing with the constantly changing state of WebRTC can be a challenge. Here is my story about how I messed up by not paying close enough attention (but it still wasn't so bad):
https://blog.voxbone.com/webrtc-how-to-hit-a-moving-target/
October 21, 2020