* feat: Adds events for session-add, session-remove and session-accept.
* feat: Refactor updating presence for audio/video mute and video type.
This brings few changes and fixes. Thew initial presence will always miss audioMuted and videoMuted value, those will be added on session accept. All updates to presence are done on sessionAccept, on source-add or on source-remove and the only one not signalled when camera track is replaced by video track and vice versa.
This change brings more presence updates when number of participants are below startAudioMuted/startVideoMuted, but when participants are above those numbers we get less presence update. This is important for big meetings.
Fixes wrong videoMuted state, as replace track and mute are both executed in promise, sometimes the replace-track one finishes first and when the mute one is resolved there is no conference object in the track to be able to update the presence (hitting this when we pass the startAudioMuted threshold).
* squash: Put back the tracks for _setTrackMuteStatus and _setNewVideoType.
* squash: Fix line length.
* squash: Fix skip sending presence twice.
* squash: Adds the error to the error callback.
* squash: Fix newJingleErrorHandler.
They are companion rooms created in a separate MUC. The room relationship is
maintained by a Prosody plugin.
All signalling happens through the breakout rooms MUC component.
Co-authored-by: Saúl Ibarra Corretgé <saghul@jitsi.org>
* feat: Audio/Video moderation.
* squash: Fix docs.
* squash: Adds some warning logs when execution is rejected.
* squash: Changes a field name in the message for adding jid to whitelist.
* squash: Send to participants only message about approval.
Skips sending the whole list.
* squash: Fixes tests.
* squash: Adds more logs.
* feat: Separates enable/disable by media type.
Adds actor to the messages to inform who enabled it.
* squash: Fixes log line.
* squash: Fixes comments.
* squash: Fixes log messages.
* squash: Fixes comments.
* Added video mute participant
* Trigger mute event
* Optimized mute type checks
* Fixed event name
* Fixed some linter issues
* Fixed more linter issues
* And even more linter issues fixed
* And more linter fixes
* Added media type to analytics event
fix(ice-restart): Force client reloads when call is migrated.
Force the client to reload when the bridge that is handling the media goes down.
This mitigates issues seen on the bridge because of a client re-joining the call with the same endpointId, BWE issues, etc.
This behavior is configurable through 'enableForcedReload' setting in config.js.
feat: Skips using disco-info for features. (#1450)
* fix: Drops unused parameter of join and sendPresence.
* feat: Skips using disco-info for features.
Uses presence to publish features added externally.
Recognizes jigasi participants using a specific presence extension used by jigasi.
* squash: Fixes tests.
* squash: Adds e2ee to the features in presence.
* squash: Fix function name and docs.
* squash: Drops detecting jigasi from initiator.
Using the newly added presence features.
* squash: Drops unused var.
* squash: Fix comments.
* squash: Adds a constant and for E2EEE feature.
* Initial impl of lobby rooms.
* Fixes tests to check the new fulljid added to MUC_MEMBER_JOINED.
* Updates few of the comments, renaming some functions.
* Renames disableLobby ChatRoom option to enableLobby.
* Fixes a comment.
* Moves setMembersOnly method to ChatRoom.
* Fixes counting members, to exclude jicofo.
* Moves setLobbyRoomJid earlier and renames a method.
Rename _maybeEnableDisable to maybeJoinLeaveLobbyRoom.
* Drops using custom roomconfig lobbypassword field and reuse room lock.
* Handles destroying the lobby room.
* Handles clear lobby room on destroy for moderators.
We do not try to leave the lobby room as it is server-side destroyed and we handle that. The only case of leaving a lobby room is when request to join room is being approved.
* Join main room if lobby is disabled while waiting.
* Adds MEMBERS_ONLY_CHANGED conference event.
* fix: Make sure we leave lobby if main room is joined.
* fix: Setting password when joining locked room.
* fix: Fixes case where we enable lobby for already locked room.
* fix: Fixes case where we enable lobby and then lock room.
* fix: Fixes lint.
* ref: Removes shared password for lobby.
This functionality is handled by the lock room password and handled there.
Removes duplication and unnecessary complicated API for lobby room.
* fix: Fixes comments.
* Updates kicked event to inform local and remote kicks and who it affects
* Parses actor from MuteIQ and adds participant info to mute track event.
* Fixes emitting both events.
* Fixes comments.
Changes the behavior to actively open new WebRTC Data Channel instead
of waiting for the JVB to do it.
Adds ICE_RESTART_SUCCESS event used to re-initialize the data channel in
case of ICE restart where the conference could have been moved to
another bridge.
Handles private messages received by speakerstats component.
Updates speakers stats with values received by the spealerstats component, all the logic is activate only in case we discover speakerstats component address from disco-info and the incoming message is coming from that component.
Exports additional statistics through ConnectionQuality (#813)
* feat: Read the server region from Jingle and broadcast it with statistics.
* feat: Adds the bridge count to local "statistics", refactors conference-properties.
* fix: Emits the conference properties with the event, small fixes.
* ref: Orders the imports alphabetically.
As described by @virtuacoplenny:
[T]he ordering is based on import path, not import name, with different
file depths being grouped together, node modules being grouped together
at the top.
* fix: Keeps JitsiConference#properties always defined.
* fix: Does not fire an event when the argument is undefined.
ref(recording): change implementation to match VideoSIPGW (#769)
* ref(recording): change implementation to match VideoSIPGW
VideoSIPGW takes in a chat room and uses instance variables
on the chat room. RecordingManager has been changed to
mirror this approach because of the case where jitsi is
deployed on a domain requiring authentication. In that
case, the initial chat room is created and fails, a
new chat room (connection) is created for authentication,
authentication is put onto the failed chat room, and the
failed chat room is used. As such, recordingManager
should not be tied to chat room creation itself but
rather tied to the first chat room.
* squash: use git mv to detect capitalization change
feat(recording): frontend logic can support live streaming and recording (#741)
* feat(recording): frontend logic can support live streaming and recording
Instead of either live streaming or recording, now both can live together.
The changes to facilitate such include the following:
- Remove the old recording.js module which allowed one recording at a time.
- Remove events for live stream url changes as the url is now part of a
sesssion and not fired independently.
- Availability of sipgw and recording are gone. Instead sessions have a
failure reason. For sipgw sessions, store that failure and emit it to
listeners.
- Create a new recordingManager singleton that can start/stop sessions
and handle updating known state of those sessions. Known state is
emitted through one event.
- Create a JibriSession model to encapsulate state of a session.
* update comments, use map to store sessions
* always pass in focusmucjid
* try to fix jibrisession docs and remove default null
feat(recording): show the YouTube live stream URL (#736)
* feat(recording): show the YouTube live stream URL
- Pass you_tube_broadcast_id to Jibri so it can create a
YouTube link for the live stream.
- Emit the liveStreamViewURL (the YouTube link) when it
is received from the participant doing the recording.
* set member.liveStreamViewURL only when truthy
* Changes initialization of videoSIPGW.
* Adds some errors returned on creating videoSIPGW session.
* Fixes sending videoSIPGW session STATE_CHANGED event.
* Fixes sending jibriIQ, no result status is received.
* Adds VIDEO_SIP_GW_SESSION_STATE_CHANGED to JitsiConferenceEvents.
* Fixing comments.
* Adds video sip gw handling.
Parsing presence and availability of the service. Adding possibility to start/stop a video sip gw session.
* Fix comments.
* Adds more jsdoc about create session and renames import to use the filename is imports.
* ref(RTC): store remote tracks in peer TPC
In order to implement P2P <-> JVB connection switching we need to
be able to associate remote tracks with the TraceablePeerConnections.
* feat(ChatRoom): multiple presence handlers
Add support for more than 1 presence handler per tag name.
* feat(JitsiLocalTrack): update stored MSID
* ref(stats): add peer connection arg to BYTE_SENT_STATS
Required to store local SSRCs in TraceablePeerConnection.
* ref: change local SSRCs strategy
* fix: generate recvonly SSRC if 0 video tracks
Video SSRC has to be generated for the recvonly stream if there are no
video tracks in the PeerConnection.
* feat: add "attach" and "detach" methods
* feat(jitsi tracks): improve logging
Adds toString methods and improve log messages around local and remote
tracks.
* ref(modify SSRCs): optimisations + fixes
- adds _doRenegotiate to JingleSessionPC that wraps some of
the duplicated logic
- fixes problems with attach/detach
- renames methods to reflect what that they really do (operate on
JitsiTrack rather than streams)
* ref(JingleSessionPC): remove duplication
Extracts common code for the 'modificationQueue' execution
* ref(VideoMuteSdpHack): rename, add docs, fix minor
Renames, adds docs and moves 'modified' flag and media direction
modification.
* ref(TPC): add 'isSimulcastOn'
* ref(MungeLocalSdp): move to RTC module
* ref: move "ufrag" events to the RTC module
* ref(JitsiConference): use promises for mute
* feat(XMPPEvents): add CONNECTION_ESTABLISHED
* feat: add peer to peer
* fix(P2P): deal with everyone's a moderator + fixes
* feat(P2P): implement "backToP2PDelay"
* fix(TPC): crash on FF accessing LD/RD
Firefox return null/undefined for localDescription/remoteDescription
objects if they have not been set yet, while Chrome does return empty
object instead. This commit makes the behaviour consistent by making
sure that at least empty object is returned for all browsers.
* fix(TPC): replace isFirefox with feature
* fix(JSPC): fix renegotiate crash on FF
FF does not allow to call 'createAnswer' in 'have-local-offer' state
* fix(JSPC): fix addIceCandidate crash on FF
* doc(JitsiConference): fix outdated comment
To be squashed with "ref(ChatRoom): remove unnecessary JingleSessionPC dependency"
* style(JitsiConference): rename arg to "jingleSession"
* feat(stats): add 'p2p' to 'transport'
The new p2p field will inform whether the transport comes from the peer
to peer type of connection or not.
* doc(TPC): describe local maps
* fix(P2P): multiplex between JVB and P2P ICE status
Will make sure that when in P2P mode the conference will be updated
with the ICE state coming from P2P and when in the JVB mode will get
the JVB one.
* doc(TPC): fixes docs and adds FIXME
* ref: use 'doesVideoMuteByStreamRemove'
* feat(P2P): stop P2P when ICE enters FAILED
The conference will switch back to the JVB connection when P2P
connection breaks (ICE enters failed state).
* feat(P2P): "connectivity-error" for ICE failed
Will use "connectivity-error" reason element name when ending P2P
session due to ICE failure.
* feat(xmpp): make P2P Stun servers configurable
STUN servers used in the P2P connection can be configured through
"p2pStunServers" option.
* ref(JitsiConference): use 'getActivePeerConnection'
* fix(P2P): re-create 'dtmfManager'
* ref(P2P): deal with ICE "completed" state
* ref(RTC): rename "owner" to "ownerEndpointId"
* fix(MungeLocalSdp): fix directions
* ref(ParticipantConnectionStatus): use for..of and () =>
* remove double 'l'
* ref: fix ESLint errors
* fix(MungeLocalSdp): adopt to new SdpTransformerUtil
* ref(MungeLocalSdp): use for .. of
* ref(SdpTransformUtil): remove "forEachSSRCAttr"
* fix(SDPDiffer): fix invalid "arrayEquals" call
* doc(MungeLocalSdp): add fixme
* fix(P2PEnabledConference): JVB tracks not added
* ref(JitsiConference): doc + rename mute methods
* ref(JitsiConference): adjust log level
* fix(JitsiConference): remove invalid eslint comments
Some mistake during rebase merge
* doc(JitsiConference): add FIXME
* ref(JitsiConferenceEventManager): stick to "tpc"
* ref(JitsiLocalTrack): use Set for "peerConnections"
* ref(JitsiLocalTrack): simplify expression
* ref(MungeLocalSdp): style + doc fixes
* ref: rename MungeLocalSdp to LocalSdpMunger
* ref(ParticipantConn..Status): rename method
* ref(SignalingLayerImpl): use Map and =>
* fix(strophe.jingle.js): minor style fixes + rename
* doc(XMPPEvents): typo
* doc(P2PEnabledConference): typo and style
* ref(P2PEnabledConference): rename methods
* ref(P2PEnabledConference): do not use "window"
* fix(P2PEnabledConference): cleanup deferred task
* ref(TPC): make options the last arg
* ref(TPC): use Map
* ref(TPC): syntax and other fixes...
* doc(ChatRoom): remove comment
* ref: remove P2PEnabledConference
* fix: remove JSUtil.js
* ref(LocalSdpMunger): re-use 'RtxModifier'
Reuses RtxModifier for injecting local RTX SSRCs as part of
the LocalSdpMunger logic.
* doc(LocalSdpMunger): remove confusing FIXME
* fix(TPC): setLocalDescription for FF
* fix(LocalSdpMunger): crash on react-native
* fix(JingleSessionPC): no events when ended
The instance once terminated should not emit connection state events.
* fix(P2P): do not start P2P on react-native
* fix: log meaningful error
Prior to this change you would see something like:
JitsiConference <error>: null
* fix(JingleSessionPC): no IQs once ended
* fix(JingleSessionPC): Jingle error logging
* fix: arguments order
* fix: make audio SSRC consistent
Audio SSRC needs to stay consistent between detach and attach operations
in order to avoid source-remove/source-add.
* fix(P2P): disable P2P on FF
There are problems with going back from P2P to JVB in FireFox. Other
participants will not see FF video. Looks like something related to
detach/attach.
* fix(JitsiConference): attach local tracks
Local tracks should be attached back to the JVB connection only
if the P2P was established.
* ref(JitsiConference): PR review fixes
ref(JitsiConference): else if
ref(JitsiConference): use getter
doc(JitsiConference): add comment
style(JitsiConference): remove extra line
log(JitsiConference): misleading msg
ref(JitsiConference): rename method
* ref(RTC): del _iteratePeerConnections
* ref: move getUfrag to SDPUtil
* fix(LocalSdpMunger): docs and if check
* fix(TPC): docs and typo
* ref(JingleSessionPC): PR review fixes
ref(JingleSessionPC): rename 'candidates'
ref(JitsiConference): remove extra check
ref(JitsiConference): rename isP2PEstablished
ref(JitsiConference): rename field (typo)
* doc(JitsiConferenceEventManager): typo
* ref(JitsiLocalTrack): rename var
* ref(JitsiConference): PR review fixes
ref(JitsiConference): rename var
doc(JitsiConference): add comment
doc(JitsiConference): add comment
doc(JitsiConference): fix comment
ref(JitsiConference): rename listener
ref(JitsiConference): rename var
* doc(RTC): remove duplicated arg description
doc(RTC): fill docs
* doc(SignalingLayerImpl): remove fixed FIXME
* ref(strophe.jingle.js): remove comment and break line
* style(TPC): formatting
doc(TPC): add FIXME
ref(TPC): remove unused code
doc(TPC): add docs
* doc(JingleSessionPC): mark "send" methods private
style(JingleSessionPC): extra lines
Currently if RTCPeerConnection is closed (an event is delivered) and we haven't called close method ourselves, this means browser has closed it due to suspending the PC.