From: Chad Phillips Date: Fri, 31 May 2019 18:07:11 +0000 (-0700) Subject: Fix FS-11874 X-Git-Tag: v1.8.6~1^2~49^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fdc4433e5a72b2fdec6455c50f0d5ce67d76271;p=thirdparty%2Ffreeswitch.git Fix FS-11874 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'. --- diff --git a/html5/verto/js/src/jquery.FSRTC.js b/html5/verto/js/src/jquery.FSRTC.js index 1046f7c9e2..f79ea835d9 100644 --- a/html5/verto/js/src/jquery.FSRTC.js +++ b/html5/verto/js/src/jquery.FSRTC.js @@ -778,7 +778,7 @@ // 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]);