owt-client-javascript icon indicating copy to clipboard operation
owt-client-javascript copied to clipboard

Failed to construct 'peerconnection', cannot create so many peerconnections

Open ghost opened this issue 5 years ago • 2 comments

Failed to construct 'peerconnection', cannot create so many peerconnections

Scene:

When the browser client constantly switches the resolution and subscribes again, the created peerconnection seems to have never been released, but I explicitly called the publication. Stop () method.   This problem causes too many peerconnections to re subscribe to new streams;

Help to look at this problem. Thank you

ghost avatar Dec 10 '19 09:12 ghost

There is a limitation of the max number of PeerConnections. Please try applyOptions if you want to update resolution.

jianjunz avatar Feb 13 '20 02:02 jianjunz

Hi @jianjunz , Even I faced this problem recently. When I connected to multiple rooms at different timings using the same browser and tab, end of the day when I tried to connect another room, this error occurred, when I closed the tab and reopened in another tab it worked. In my application, I used to subscribe to the stream whenever it is visible in the UI/whenever it is required, so subscribing and unsubscribing the streams will happen frequently, this practice will cause this error frequently ??

Please help.

Thank you.

kurapatijayaram avatar Jul 06 '20 19:07 kurapatijayaram