fix(ssrc-rewriting): Fire track removed/added instead of owner changed.
When an existing SSRC for a remote track gets re-mapped from one source to another, fire a TRACK_REMOVED event followed by TRACK_ADDED event instead of TRACK_OWNER_CHANGED event. This should simplify the application logic for track handling.
fix(JitsiConference): Clear jingleSession after session restart.
This makes sure that any track operations that are executed after the terminate is sent and before the new session is established get synced up on the new session.
Also reset the JVB stats. Fixes https://github.com/jitsi/jitsi-meet/issues/14326.
fix(conference): Remove the tracks that were filtered out.
When tracks are not included in the initial offer/answer, remove them from the conference. Otherwise, the tracks in conference will be out of sync with those in the media sessions.
fix(JitsiConference): Check if track belongs to the conference before addition/removal.
If the local track was not added to the conference because the participant was muted on join by focus, add it the conference instead of adding it to the media session when the user unmutes. Fixes a failing torture test case.
* fix(RTC): Remove support for plan-b SDP.
Since unified plan mode becomes the default mode, so does multi-stream mode.
* squash: Remove plan-b unit tests and fix comments
* squash: address review comments
fix(codec-selection): put Av1 support behind a flag.
Fixes an issue with audio after p2p->jvb switch when the media active state is set to false because of a setVideoCodecs call after a remote user joins the call.
Unify events and output single TypeScript declaration (#2407)
* fix(events): unify events to a single EventManager type, add support for single typescript declaration
* fix(lint): fix lint
* fix(events): fix incorrect instatiation
* fix(events): clean up redundant methods
* fix(events): keep EventEmitter name, alias NodeEventEmitter
* fix(events): fix loose reference
* fix(EventEmitter): remove on/off alias as redundant
* fix(RTCUtils): bring event handlers under class to use same event emitter
* fix(RTCUtils): fix lint
* fix(codec-selection) Use a configurable preferred codecs list to select the codecs.
Allow asymmetric codecs to be configured on the endpoints. This means that Firefox and Safari which have bugs with VP9 encode will now encode VP8 but decode VP9 coming in from Chromium endpoints.
* fix(codec-selection) Add unit tests for the codec selection logic.
* feat(codec-selection): Introduce mobileCodecPreferenceOrder setting in config.js.
* fix(codec-selection) Avoid unnecessary renegotiations.
On participant join/leave, check if the new intersection of codecs are already configured to be the top n codecs.
* Address review comments
* fix: Strip the codecs that are not in the codec list from the video m-lines.
Also, ignore remote codecs published in presence for p2p connections.
* fix: Define default codec order for mobile and desktop.
Fix an issue where p2p between mobile and desktop was broken.
* fix: Add default codecs for both p2p and jvb on mobile devices.
Munge the initial offer sent out by RN clients since RN doesn't support RTCRtpTransceiver#setCodecPreferences.
* feat(signaling) Only include 'msid' in the source description.
'cname', 'label' and 'mslabel' attributes that are included in the source description of the signaling messages are ignored by Jicofo. Only 'msid' is used for source validation.
Therefore, drop those attributes and make sure 'msid' is always included and in the format '<endpoint_id>-<mediaType>-<trackIndex>-<tpcId>'.
* fix(p2p) Enable p2p for Firefox.
Set the senders attribute correctly in the outgoing jingle message. Ignore the media direction from the session, only look for the direction in the media desccription. This fixes an issue where Firefox rejects an answer because the direction is not set correctly.
fix(JitsiConference) Do not add local tracks on p2p when startMutedPolicy is set to true.
Fixes an issue that started surfacing after f0dd403951 because local tracks were getting added to pc even when the moderator has set start muted policy to true.