We have some problems with latency; The latency is low when we connect to the WebRTC sender via web browser, but when the Unity application is loading a scene, it seems like the buffer of video stream on receiver builds up - and latency is increased from 60ms to 500ms
We have monitored the jitter buffer on the web receiver, and it seems that this builds up as a result of the Unity application loading scenes.
Is there a way to “reset” / clear the jitter buffer (if this is the cause of the latency)?
We have monitored the jitter buffer on the web receiver, and it seems that this builds up as a result of the Unity application loading scenes.
I assume that loading scenes would make a CPU spike and it makes delay of packing audio buffer.
AudioStreamTrack makes the component internally and fetches audio buffer using OnAudioFilterRead method here. I have not been sure the detail of issue yet, but I guess there are isues around these code.
When the Unity application that is sending video stream is loading a scene, the WebRTC receiver builds up a latency in video stream. The latency is higher the longer the loading time is on the sender. It seems like it is the “freezing” of the sender application that is causing this latency, since we tried right clicking in unity editor on sender app, and this had same result.