I am using agora to make a video calling app. I am using the agora-rtc-sdk-ng package. I am following this doc for my project. I have converted this into a nextjs project. But I am facing this error when I rejoin a call. DOMException: Failed to construct 'RTCPeerConnection': Cannot create so many PeerConnections
How do i solve it?
I did some research and found this doc But I can't understand where this fits in the code i am using.
I also face the same error with the Agora RTC SDK in my React Js project. I searched the internet and found that it's related to the browser garbage collector. In my assumption, it could happen to any WebRTC library like Agora. I found that this answer about handling the garbage collector for WebRTC https://stackoverflow.com/a/66546935/8339172 helped some people.