Search code examples
javascriptwebsocketwebrtcpeerjs

Peerjs: on connection not working on safari and iOS


This code work fine on android and pc But not working on Safari and iOS

myPeer.on('connection', (conn) => {
                console.log("connection");
                conn.on('data', (data) => {
                    console.log(data);
                });
            });

On safari I get this error:

ERROR – "PeerJS: " – "Error:" – "(TypeError) Attempted to assign to readonly property."

Solution

  • This problem fixed in [email protected] version