Remove redundant _channelOpen flag from RTC and rely on the channel's isOpen() getter instead.
This fixes an error throw when the _channelOpen flag was not updated while the channel's been
closed by the bridge.
Delays e2e encryption initialization until any encryption key is set.
Recreates peerconnections in order to enable insertable streams
only if the e2ee is used. This is to avoid bug around insertable streams
which may cause audio issue when the main JavaScript thread is loaded:
https://bugs.chromium.org/p/chromium/issues/detail?id=1103280
fix: RTC track events emitted when switching jvb<->p2p
JitsiConference should emit JitsiConference events instead of RTC events
when adding/removing tracks on jvb<->p2p switch. This behaviour was mixing RTC layer
with the conference one. When conference switches from jvb to p2p it wants to make
the application switch to use p2p JitsiTracks, but it doesn't mean that the JVB tracks
have been removed on the RTC/peer connection level.
feat: use getSynchronizationSources on the receiver for remote audio levels (#1245)
* feat: use getSynchronizationSources on the receiver for remote audio levels
Use getSynchronizationSources if it is supported, fallback to using getStats otherwise.
* feat/ref: Use the local audio levels from LocalStatsCollector
When using getSynchronizationSources, use the audio levels from LocalStatsCollector for NoAudioSignalDetection.js
Remove obsolete code - TalkMutedDetection feature using audio levels is not used anymore
Takes disabled encodings into account when calculating the local resolution. (#1242)
* fix: Takes disabled encodings into account when calculating local resolution.
* feat: Adds a new event that's triggered when the max enabled resolution changes.
* feat: Broadcasts the max enabled resolution value along with other stats.
fix(safari): override min/max video constraints on safari (#1243)
* fix(safari): override min/max video constraints on safari
Override the constraints on Safari because of the following webkit bug.
https://bugs.webkit.org/show_bug.cgi?id=210932
Camera doesn't start on older macOS versions if min/max constraints are specified.
Adds extra 15 seconds before emitting ICE failed event. If the OS is capable of
reporting internet offline status then will start counting when the internet
comes back online.
The reason for that is when ICE restarts are disabled a user will get the page reload
screen immediately, but there's a chance to recover as long as the channels have not
expired on the bridge.
feat: Set degradation preference on video senders (#1229)
* feat: Set degradation preference on video senders
Use 'maintain-framerate' for camera tracks and 'maintain-resolution' for desktop tracks
* ref: apply cached video contraints and degradation preference on unmute
Since the sender encodings are available only after the renegotiation is complete (on chrome/safari), constraints/preferences have to be applied after renegotiation is complete.
Refactors the way send/receive video constraints are managed and puts the high level
logic in a separate module. See QualityController.js for high level overview on how
the constraints are managed now.
Adds events to JitsiConference fired whenever it starts new jvb/p2p session.
Adds event to JingleSessionPC.js when remote party signals receive max frame height.
Also adds signaling of the local recv preference for the p2p mode(only existed for JVB).
fix(media): Add 'ended' event handler on MediaStreamTrack for FF
When screensharing is stopped on FF from the sharing indicator (available in FF nightly), we are currently not detecting it.
Firefox fires a track 'ended' event as opposed to Chrome which fires a mediastream 'inactive' event as well.
* fix: Fix shuffling turn servers.
In the Fisher-Yates shuffle we want to choose 0 <= j <= i. The existing
implementation always swaps the two elements in a 2-element array.