Previously, each user broadcasted the status after a "Room" event was
received. This caused a short time for all other participants where
the buddy list showed "Participant X" instead of the real user name.
When the ICE connection state changes to "disconnected"/"failed",
these calls are marked and get re-called for conferences once the
connection is back and are allowed to send an "Offer" again.
This works in cases where the complete connectivity is lost for one
client while being in a conference once it comes back afterwards
for him.
Doesn't work reliably on Firefox as no "disconnected"/"failed" is
triggered there.
Removed difference between single peer-to-peer calls and conferences
with multiple peers. There is only a single code path now that creates
calls and stores them in a conference (which holds all active calls).
With this also fixed some timing issues that could cause conference
peers to not send or receive media streams.
Should help with some of the issues reported in #276.
The session ids contain a Gorilla SecureCookie which internally encodes
"timestamp|value". As a result, newer session ids compare "greater"
than older ids. This is a problem for conferences where the participants
decide based on comparison of the session id who calls who, so later
participants always have to call all of the existing participants.
With this change, the (random) value is at the start of the session id,
resulting in "random" ordering of participants. Also some tests have
been added to check session en-/decoding.
There was a case where a three-party conference got downgraded to a p2p
session and then upgraded to a three-party conference again, that the
two remaining participants created their own PeerConference object resulting
in a "split-brain" conference.