Because the implementation of LocalStorage in jitsi-meet at the time
of this writing is asynchronous with respect to loading and saving,
delay the generation of machineId in order to allow LocalStorage to
load any previously saved value.
fix(moderator): clears session ID on 'non-acceptable'
Currently Jicofo does not include 'session-invalid' tag when there is
"machine ID" and "session ID" mismatch, but in such case the session-id
must be cleared as well. Otherwise we'll end up in an endless loop.
With JitsiAuthConnection the API consumer has to:
1. JitsiConference.createAuthenticationConnection,
2. JitsiAuthConnecition.authenticateAndUpgradeRole,
3. Wait on the Promise of 2,
4. Maybe cancel the JitsiAuthConnection of 1.
With authenticateAndUpgradeRole the API consumer has to:
1. JitsiConference.authenticateAndUpgradeRole,
2. Wait on the thenableWithCancel of 1.
3. Maybe cancel the thenableWithCancel of 1.
feat(tpc): enforce preferh264 when setting the local description
For p2p, we have to take preferh264 into account when setting the local description, since
that prefer is what will be received by the far side. if we only do it on the remote description,
like before this change, we'll never actually end up preferring h264.
ref(JitsiLocalTrack): get rid of 'setMutedInProgress'
The 'setMutedInProgress' flag is unreliable and it can lead to weird
situations when mute operation is in progress, but the removal from
JingleSessionPC is waiting on the queue. In such case LocalSdpMunger
will fake SDP even if the track is in the PeerConnection which may
confuse some parts of the SDP transformation chain.
For example RtxModifier will not attempt to inject Rtx group description
if it sees that the SSRC are already there. But it can happen that even
though the SSRCs are there they do not contain valid track ID, because
the track has changed.
The LocalSdpMunger is supposed to fake the SDP only when the video
MediaStream is not in the PeerConnection. So this commit implements just
that: a way to tell if JitsiLocalTrack's stream is currently in
the PeerConnection (added through TraceablePeerConnection).
Random coding style-related issues that bothered me while reading the
source code touched by "Fix local video disappearing from local
thumbnail" (https://github.com/jitsi/lib-jitsi-meet/pull/571). These
include naming, formatting, comments, typos, duplication.
Commit "fix(JitsiLocalTrack): restore 'inMuteOrUnmuteProgress'" removed
all read occurrences of dontFireRemoveEvent so the one and only write
left is now obsolete.
fix(local tracks): do not fire "track stopped" during mute
Flag 'dontFireRemoveEvent' was unreliable, because if
the JitsiLocalTrack is muted/unmuted rapidly it's state can be false
at the time when ended event is triggered. The event handlers must be
unregistered to handle this gracefully.
There are scenarios when it's ok to call setP2PStatus again with
the same value. For example when P2P is stopped, before it starts with
the A/B testing mode enabled. It's only important to know that it
happened, but it's not an error, because the code will not execute
and return immediately.