feat(multi-stream-support) Handle SDP munging for multiple local/remote streams per ep. (#1868)
* feat(multi-stream-support) Handle SDP munging for multiple local/remote streams/ep.
A new SDPSimulcast class is added for handling SDP munging for local and remote descriptions to handle multiple streams for both local and remote endpoints. This new class will be used only for unified plan implentation. The sdp-simucast npm package will be used for plan-b and deprecated later when all the clients switch to unified plan.
* fix(build) fix building with TS code
Use the Babel preset for the webpack bundle since Babel 7 already
understands TS and ts-loader uses tsc instead, which we configure
differently.
* squash: Add unit test and address review comments.
Co-authored-by: Saúl Ibarra Corretgé <saghul@jitsi.org>
fix(JingleSessionPC) Do not force track removal at pc level on user leave.
When a user leaves, the ssrcs associated with the ep are removed from the remote description and a renegotiation is forced. The browser then fires 'removetrack' event on the associated MediaStream when sRD is called with ssrcs removed. The remote track is then disposed of in the event handler. Therefore, there is no need to delete the tracks at the TPC level before renegotiation. This also prevents the 'Removed track not found for stream' events from showing up in the browser console log.
Emitting declarations generated these errors:
~~~~
modules/transcription/audioRecorder.js:3:1 - error TS9005: Declaration emit for this file requires using private name 'TrackRecorder'. An explicit type annotation may unblock declaration emit.
3 const RecordingResult = require('./recordingResult');
~~~~~
modules/transcription/recordingResult.js:13:1 - error TS9005: Declaration emit for this file requires using private name 'RecordingResult'. An explicit type annotation may unblock declaration emit.
13 const RecordingResult = function(blob, name, startTime, wordArray) {
~~~~~
modules/transcription/transcriber.js:1:1 - error TS9006: Declaration emit for this file requires using private name 'SphinxService' from module '"/Users/saghul/work/jitsi/lib-jitsi-meet/modules/transcription/transcriptionServices/SphinxTranscriptionService"'. An explicit type annotation may unblock declaration emit.
1 const AudioRecorder = require('./audioRecorder');
~~~~~
modules/transcription/word.js:7:1 - error TS9005: Declaration emit for this file requires using private name 'Word'. An explicit type annotation may unblock declaration emit.
7 const Word = function(word, begin, end) {
~~~~~
Found 4 errors.
~~~~
This is just the stepping stone towards the goal of eventually having
lib-jitsi-meet fully written in JS.
- introduce ts-loader for webpack
- webpack will continue generating the UMD bundle
- tsc will generate an ES6 module
- output all bundles to dist/
ref(JingleSession) Recycle m-lines by rejecting them on source removal.
* ref(JingleSession) Recycle m-lines by rejecting them on source removal.
By rejecting the m-lines on source removal (setting the port to 0 on the associated m-line), m-lines can be recycled for new sources instead of appending new ones.
* chore(deps) update sdp-interop@latest.
ref(TPC) Remove an unnecessary toUnified sdp conversion.
sLD is called immediately after createOffer/createAnswer, therefore the desc provided by createOffer/createAnswer can be directly passed to sLD without the need for converting it to unified plan format. This also fixes a warning seen on the browser console that says 'The description does not look like plan-b'.
feat: Adjust setReceiverConstraints to use new format (#1813)
* feat: Adjust setReceiverConstraints to use new format
* add ReceiveVideoController spec
* rename prioritizedSources to onStageSources
* call FeatureFlags.init in specs and update description
* provide a default flags argument to FeatureFlags.init
* 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.