Commit 98190c9c authored by marioromera's avatar marioromera
Browse files

try different drawing formula

parent b419a869
......@@ -129,7 +129,7 @@ export function drawOffer(offer) {
offerEl = document.querySelector(`.offer-copy`);
} else {
offerEl = document.querySelector(
`.offer-${offer.from === state.socket.id ? 'copy' : 'paste'}`
`.offer-${offer.from === state.socket.id ? 'paste' : 'copy'}`
);
}
......
......@@ -103,7 +103,7 @@ export function addListenerToPeerEvents(id) {
if (type === 'answer') {
if (state.socket) {
signal.to = peer.id;
console.log('Emitting answer');
state.socket.emit('answer', signal);
}
drawAnswer(signal);
......@@ -112,6 +112,7 @@ export function addListenerToPeerEvents(id) {
if (type === 'offer') {
if (state.socket) {
signal.to = peer.id;
console.log('Emitting offer');
state.socket.emit('offer', signal);
}
drawOffer(signal);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment