Handle client reconnects better

This commit is contained in:
Håvar Aambø Fosstveit
2020-03-27 01:36:11 +01:00
parent 2b96e0b039
commit d20f0c161f
4 changed files with 111 additions and 41 deletions
+29
View File
@@ -1520,6 +1520,28 @@ export default class RoomClient
})
}));
if (this._screenSharingProducer)
this._screenSharingProducer.close();
if (this._webcamProducer)
this._webcamProducer.close();
if (this._micProducer)
this._micProducer.close();
// Close mediasoup Transports.
if (this._sendTransport)
{
this._sendTransport.close();
this._sendTransport = null;
}
if (this._recvTransport)
{
this._recvTransport.close();
this._recvTransport = null;
}
store.dispatch(roomActions.setRoomState('connecting'));
});
@@ -1721,6 +1743,13 @@ export default class RoomClient
break;
}
case 'roomBack':
{
await this._joinRoom({ joinVideo });
break;
}
case 'lockRoom':
{