Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Fixes simulcast layers ordering.

George Politis745e4a6a87be
diff --git a/simulcast.js b/simulcast.js
index 45b0f660c0..f7217b5686 100644
--- a/simulcast.js
+++ b/simulcast.js
@@ -633,8 +633,12 @@ function Simulcast() {
navigator.webkitGetUserMedia(lqConstraints, function (lqStream) {
+ // NOTE(gp) The specification says Array.forEach() will visit
+ // the array elements in numeric order, and that it doesn't
+ // visit elements that don't exist.
+
// add lq trackid to local map
- localMaps.msids.push(lqStream.getVideoTracks()[0].id);
+ localMaps.msids.splice(0, 0, lqStream.getVideoTracks()[0].id);
hqStream.addTrack(lqStream.getVideoTracks()[0]);
success(hqStream);