Skip to content

is this lib still alive ? on stream not fireing at all . no event after calling  #37

@veeyka

Description

@veeyka

is this lib still working correct ?
im using it . every thing is ok . just call.on("stream is not fireing at all . my code is simple like docs every where .

React.useEffect(()=>{
socket.clientSocket.on("connect", ()=>{
console.log("----- - - --- - - socket connection")
});

const start = async () => {
    let s;
    try {
      s = await mediaDevices.getUserMedia({ video: true});

      peer.peerServer.on("open" , (peerId)=>{
        socket.clientSocket.emit("join-room" , {peerId , userId: pageStates.userId , roomId: pageStates.roomId});
      });

      // user entered
      socket.clientSocket.on("a-user-entered" , ({newUserPeerId , newUserId})=>{
            const call = peer.peerServer.call(newUserPeerId, s);
             call.on("stream" , (remoteVideoStream)=>{
                  if(remoteVideoStream){
                         console.log("stream" , remoteVideoStream)
                  }
            });
      });

      peer.peerServer.on("call" , (call)=>{
    
        call.answer(s);
        call.on("stream" , (remoteS)=>{
          console.log("and we got " + remoteS)
        });
      });
     
    } 
};
start();

},[])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions