From 8fdc4433e5a72b2fdec6455c50f0d5ce67d76271 Mon Sep 17 00:00:00 2001 From: Chad Phillips Date: Fri, 31 May 2019 11:07:11 -0700 Subject: [PATCH] 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'. --- html5/verto/js/src/jquery.FSRTC.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]);