Add 'replaceTrack' method to API, make all replace track operations local (use same ssrcs so no need for source-add/source-remove)
* M1: device change now uses new flow. fundamentally "works" but may be corner cases/side effects to other flows. haven't touched ffox yet
* M1a: fixed a bug where the ssrc info of the new stream wasn't being set correctly, causing problems with video mute/unmute
* M1b: fix firefox. changing camera, video mute/unmute looks good
* M1c: 'replaceStream' processing is not integrated with the same queue as all of the other o/a-related events.
* fix typo, some deprecated code cleanup
* move the rfc4145 fix to traceablepeerconnection::createanswer so both the new and old o/a flows leverage it. also cleanup some now-unused code and change more functions to arrow functions so we can get rid of 'var self = this' workarounds.
* get rid of separately-mainted local description in JingleSessionPC. keep TraceablePeerConnection as the source of truth for the local sdp and have JingleSessionPC retrieve it from there.
* change the code in the old modifySources shim to use the _renegotiate method so both old and new flows use that method.
* split out the remote change processing from the local change processing to better set us up for individual remote and local modification queues
* move the setOfferCycle flow off of the old shim and into the new flow. also removes the new for this this.jingleOfferIq member
* move addRemoteStream (nee addSource) to the new flow. gets rid of the need for the this.addssrc member.
* move remove remote stream over to the new flow. gets rid of the need for the this.removessrc member variable
* temporary '_processRemoteChange' method is no longer needed, as all remote changes are processed directly (rather than setting member variables and calling a catch-all method which checks each member to see what needs to be done)
* M2: add 'sdp-consistency' in an attempt to separate out the restoration of the same ssrcs (also requires the changes i've made to sdp-simulcast, currently in my brian/rework branch @90aceaddb1eec4d15026efac82c140579c7af2b3, as well as a commit in jitsi-meet to change the toggle-screenshare flows over to use the new 'replace' chain). as of this point video mute, change device and toggle screenshare all happen as local operatons. there is a bug when starting as video muted i need to look into, and i haven't checked firefox yet.
* fix the bug with start-as-video-muted (relies on commit f1d8d3c831 in brian/overual sdp-simulcast branch)
* some code cleanup, marked some TODO list items. got addStream off of the old shim and onto the new flow
* change removeStream over to the new flow and off of the shim. shim is now removed!
* fix a bug when muting a stream. remove some logic from addstream/removestream that i don't think makes sense, and move the source-remove parsing logic into a helper
* move the source-add/source-remove processing into the atomic queued operation since it looks at sdp.
* remove unused code used for old ssrc replacement logic
* get rid of the need for TraceablePeerConnection::addStreamNoSideEffects
* get rid of need for TraceablePeerConnection::removeStreamNoSideEffects
* distinguish XXXStream and XXXStreamToPeerConnection (was XXXStreamNoSideEffects)
* remove shim methods for add/removeRemoteStream
* fix a bug when adding local media for the first time
* replace the old 'dispose' method with the new one
* address feedback comments. update version of sdp-simulcast.
* update sdp-simulcast version
* add missing semicolons
* move sdpconsistency to es6 style
* restore JitsiConference::removeTrack, restore JitsiLocalTrack::dispose back to how it was (doing o/a if necessary)--we get around this on replace by not disposing the track until after we do the replace)
* change removeTrack and addTrack to leverage replaceStream
* fix removeTrack to return the promise, handle an already-disposed track
* add more documentation
* remove unnecessary semicolon
* update sdp-simulcast version
* address PR feedback
* remove usage of @type in method js docs
* address (more) pr feedback. upgrades to a new sdp-simulcast version which fixes an issue in smoke tests
* more PR feedback, and clean up the success/error handling done for the work functions.
* tweak the error propagation
React Native's module bundler (aka packager) has its default Babel
preset - react-native/babel-preset - which it uses in the absence of a
custom .babelrc. Unfortunately, the default may be tripped by the
presence of a .babelrc in dependencies. Additionally, if the default
does not get tripped, the npm install of lib-jitsi-meet as a dependency
may fall into a recursion in which Babel attempts to transpile
react-native/babel-preset. To reduce the risks of stumbling upon such
problems, move Babel's configuration inside the Webpack configuration
file.
Our JSHint configuration is not extensive and we have excluded multiple
files from linting. Additionally, we have seen JSHint to be unable to
parse newer ECMAScript features such as the object spread operator
(proposal).
On the other hand, we have seen ESLint to beautifully work on React and
React Native source code in addition to ES2015 and later. Introduce
ESLint alongside JSHint as an intermediate step to eventually switching
from JSHint to ESLint.
As our source code does not fully follow even the JSHint rules we have,
it is very difficult to introduce ESLint with many rules. At the
beginning, introduce it with as little rules as possible. Morever,
ESLint is able to automatically fix certain rule offenders so once we
have ESLint merged we can incrementally add new rules while keeping our
commits' modification on as little subjects as possible.
The build process is capable of bundling both minimized and unminimized
artifacts for lib-jitsi-meet. However, there does not seem to be a good
reason to (1) always wait for the building of the two versions and (2)
distributing the unminimized artifact.
1. The minimized versions of the library lib-jitsi-meet i.e. the file
lib-jitsi-meet.js with the default configurations of Browserify and
Webpack are, respectively, 614KB and 424KB. That's a reduction in
file size of approximately 30%. While such a reduction may be
achieved with Browserify, such a configuration would be non-default
i.e. it would be more complex.
2. The build process of the library lib-jitsi-meet with Browserify is
split into three distinct steps by package.json: transpile, version,
and minimize. The transpile step produces a .js file and a source map
which get consumed by the minimize step (as input files). A possible
problem appears during the version step which modifies the .js file
without modifying the respective source map. Thus, there is a risk
that the source map of the minimized version of the library
lib-jitsi-meet is broken. The Webpack approach carries out the
version step in a way that precludes the possible breaking of the
source map.
3. The introduction of ES2015 forced us to split the Babel-related parts
of the build process out of package.json into start_browserify.js. As
may be seen by comparing start_browserify.js and webpack.config.js,
there are similarities. The advantage of Webpack is that the other
parts of the build process are inside webpack.config.js as well. In
other words, there is no split in the build process and there is less
complexity.
Changes video mute/unmute implementation. JitsiLocalTrack objects store information about the SSRCs. On video mute / unmute operation no jingle packets are sent anymore.