]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fix FS-11874
authorChad Phillips <chad@apartmentlines.com>
Fri, 31 May 2019 18:07:11 +0000 (11:07 -0700)
committerChad Phillips <chad@apartmentlines.com>
Fri, 31 May 2019 18:07:11 +0000 (11:07 -0700)
Verto JS libs allow passing an attachStreams array of MediaStream objects, which are then supposed to be added to the peer connection in the order they are supplied in the array.

However, there is a faulty logic check prior to actually adding the streams, where 'options.attachStream' is checked for length instead of 'options.attachStreams'.

html5/verto/js/src/jquery.FSRTC.js

index 1046f7c9e28d5a0363d11e221e29fe19e99f42ea..f79ea835d9d8ad89b906395fc2890cbe3f7e585e 100644 (file)
         // attachStreams[0] = audio-stream;
         // attachStreams[1] = video-stream;
         // attachStreams[2] = screen-capturing-stream;
-        if (options.attachStreams && options.attachStream.length) {
+        if (options.attachStreams && options.attachStreams.length) {
             var streams = options.attachStreams;
             for (var i = 0; i < streams.length; i++) {
                 peer.addStream(streams[i]);