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.
As new use case for joining a conference without calling GUM has been
added to jitsi-meet enumerate devices should not be delayed. In fact not
only it was delayed, but never called in such case
(getUserMediaStatus.initialized stays false forever).
make audio processing constraints configurable (#491)
* make audio processing constraints configurable
AP: echoCancellation is a "master switch" for disabling all audio processing. set to disableAP=true and stereo=true allows fullband, stereo sound.
AGC: misbehaves with certain 'pre-gained' mics.
HPF: can't hear any effect but it's the last constraint to make configurable.
* Update RTCUtils.js
firefox 54 crashes if we insert the rid simulcast receive lines in the remote description, so only do that if simulcast is turned on (which is still experimental for firefox and not enabled by default)
* add support for signaling simulcast for unified plan
1) munge the incoming offer to advertise support for receiving simulcast in unified plan
2) add 3 simulcast encodings via rtp sender
3) inject an ssrc-group line, even when using rids for simulcast (jicofo will rely on this)
* add rid information to the session-accept jingle
* address lenny's feedback
* make firefox simulcast configurable
* fix missing comma
feat(ScreenObtainer): trigger external for not verified site
Will trigger external installation also for sites that are not the main
whitelisted domain. This allows to reuse one extension for many sites
(they still have to be on the whitelist, but only one can be "main").
CHROME_EXTENSION_USER_GESTURE_REQUIRED will be triggered if
the extension installation fails, because the request to get desktop
stream did not originate in user gesture handler (a button click for
example).
* ref(JSPC): simplify SSRC owner in P2P
There's no need for any extra extensions for SSRCs owner signalling in
P2P, because it's always the remote peer who owns them.
This also fixes a problem where no SSRC owner was added for 'source-add'
in P2P (for JVB conference Jicofo adds that).
* fix(TPC): always advertise 'sendrecv'
Our media direction is only ever updated on the remote side with
the initial offer (or answer). Because of that we want to advertise
'sendrecv' even if we start with no video (or audio) track.
It is OK to adjust this direction in the localDescription getter,
because it's adjusted again in the setter to the correct value based on
local tracks, so the SDP transformation chain still works fine.
Reorders JitsiTrackEvents.TRACK_AUDIO_LEVEL_CHANGED event arguments by
putting TraceablePeerConnection at the end. This way it's easier to
treat it as "library internal".
If the app depends on tracking current tracks state using
"track added/removed" events, the tracks will be leaking if
JitsiConference.leave() method is used. That's because peerconnections
are closed and removed from RTC module and then from onMemberLeft those
events will not be fired, because tracks will be gone with
the peerconnections.
Also removes error message log, because it no longer makes sense if
the tracks can be removed early by "stop P2P" logic without actually
removing them from the TPC. Then when the TPC is closed it will try to
emit the events again. But this time it will not match any tracks in
the JitsiParticipant, because it has been removed already.
* doc(JitsiConference): deprecate 'isInLastN'
The 'isInLastN' method should not be used for the UI purposes, but
ParticipantConnectionStatus value should be used instead.
* fix(ParticipantConn..Status): speed up INACTIVE transition
Before this change when user's video stops playing, after user is
removed from last N we were waiting 2 seconds, before going to INACTIVE
state. This commit reduces the time to 500ms for such case.
* fix(ParticipantConn...): reduce logging
Reduce logging verbosity.
* fix(ParticipantConn...): handle LastN == 0
When LastN is set to 0 we should not rely on video playback and last N
set for figuring out participant connection status.
* fix(JitsiConference): undefined participants
Fixes a crash when this.participants field is accessed from _init.
Do the same which was done for the selected endpoint. That is if
an endpoint is pinned, before data channels are available then the value
should be cached and sent as soon as they are opened.
* feat: multiple, simultaneous RTP stats
Makes it possible to have remote RTP stats running for more than one
peerconnection at a time.
* feat(stats): report RTT all the time
Will report JVB RTT (and end to end) while in P2P mode and vice versa.
* fix(JitsiConferenceEvents): remove CONNECTION_STATS
CONNECTION_STATS event is no longer emitted.
* fix(AvgRTPStatsReported): users with no video
Do not include FPS == 0 in average remote FPS calculation. Report NaN
for local FPS when video muted or no video device. NaN will be reported
for avg remote FPS if no video is received.
* fix(AvgRTPStatsReported): reset total packet loss
* feat(AvgRTPStatsReported): report 'screen' FPS
Will report average FPS for screen videos separately from camera videos,
but only if available (camera video reports NaN FPS when not available).
* fix(AvgRTPStatsReported): end2endRTT
Needs to report JSON with value.
* feat(AVG RTP stats): separate audio and video bitrate
Will report average audio and video bitrates separately.
* doc(JitsiConference): try to improve comment
* fix(AvgRTPStatsReporter): remove confusing reset
There's no a clear reason for doing reset there.
* ref(AvgRTPStatsReporter): rename var
* ref: store SSRCs as a number
Converts all the places where SSRCs where stored as string to use
numbers.
* doc(RTPStatsCollector): getNonNegativeStat
Fixes invalid description about returning NaN.
* ref(JitsiConf...EventManager): simplify for..of
* ref(JitsiRemoteTrack): throw TypeError
Will throw a TypeError when 'ssrc' is not a number.
* fix(RTPStatsCollector): invalid reference
* doc(RTPStatsCollector): getNonNegativeStat private
* ref(RTPStatsCollector): simplify for..of
* fix(SSRCs): check for negative value
Will not accept negative SSRCs, since those are supposed to be unsigned.
fix(tracks): Do not use track.addEventListener if unavailable
It is not guaranteed addEventListener will be available. Its
absense but usage causes a script error in Internet Explorer.
Instead, do a truthy check for it and then use it and fall
back to attachEvent if it is available.