-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
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();
},[])
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels