9 Commits

Author SHA1 Message Date
aa7a6927f8 Keep active peer connections after server restart 2020-03-13 14:01:45 +01:00
cd4979c3be Generate userIDs on server-side
We don't want to depend on:

1) socket.io generated IDs because they change on server reconnect
2) simple-peer generated IDs because they change for every peer
connection

We generate a single ID when the call web page is refreshed and use that
throughout the session (until page refresh).

We keep relations of user-id to socket-id on the server side in memory
and use that to get to the right socket. In the future this might be
replaced with Redis to allow multiple nodes.

If the server is restarted, but people have active calls, we want them
to keep using the active peer connections and only connect to new peers.

Ideally, we do not want to disturb the active peer connections, but peer
connections might be restarted because the in-memory store will not have
the information on for any peers in the room upon restart.
2020-03-13 13:33:54 +01:00
e851181ffa Fix SocketActions.test.ts 2020-03-10 13:42:47 +01:00
f056048d62 Use addTrack/removeTrack over addStream/removeStream
The addStream and removeStream are deprecated and the MDN docs
recommend using addStream/removeStream instead.

While we add tracks, we can also add event listeners to whether or not a
track has ended and then remove a stream once all tracks in the streams
have ended.
2020-03-10 11:21:35 +01:00
ff5a20e13f Stop using local stream after hangup 2019-11-18 09:42:18 -03:00
7fa09fa6b8 Use TypedEmitter for client socket connections 2019-11-15 23:38:19 -03:00
45486aa837 Fix SocketActions.test.ts 2019-11-14 00:30:09 -03:00
4fa6a0d17a Refactor all components 2019-11-13 18:36:31 -03:00
e9926e3484 Refactor actions/reducers to TS 2019-11-13 11:16:09 -03:00