feross/simple-peer

Export signaling data

claudiojulioferraz opened this issue · 2 comments

Signaling data can not be exported. It is necessary to make a way to get them and exports them simply.

You can not get data from this method: peer1.on('signal', data => {})

Related with React:

In my case peer1.on('signal', data => {}) started crashing React application and there were no possibility to create new peer connection object.

I have found that issue occurs with simple-peer version of 9.11.0 and react-scripts of 5.0.0

After downgrading react-scripts dependency to 4.0.3 it started working back as should be. Peer connection has been created and data channels are working.

It seems that there is a conflict with simple-peer and new version of react-scripts.

Hope that info will help you.

Thanks for listening. I do not use React, use Svelte. I was trying to do with pure JavaScript, but it's much easier to use Svelte. With pure JavaScript I think it would be necessary to understand the asynchrony of the method. I thought of using a reactive library, such as RXJs, but Svelte is much easier.