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 error when simulcast is disabled.

George Politis65ddc22112c5
diff --git a/index.html b/index.html
index e961fa68c7..b7da53f04c 100644
--- a/index.html
+++ b/index.html
@@ -11,7 +11,7 @@
<meta itemprop="image" content="/images/jitsilogo.png"/>
<script src="libs/jquery-2.1.1.min.js"></script>
<script src="config.js?v=5"></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
- <script src="simulcast.js?v=4"></script><!-- simulcast handling -->
+ <script src="simulcast.js?v=5"></script><!-- simulcast handling -->
<script src="libs/strophe/strophe.jingle.adapter.js?v=2"></script><!-- strophe.jingle bundles -->
<script src="libs/strophe/strophe.min.js?v=1"></script>
<script src="libs/strophe/strophe.disco.min.js?v=1"></script>
diff --git a/simulcast.js b/simulcast.js
index 8990a0cfe2..4ee46df974 100644
--- a/simulcast.js
+++ b/simulcast.js
@@ -934,6 +934,29 @@ function SimulcastManager() {
// Create remote simulcast.
this.simulcastReceiver = new SimulcastReceiver(this.simulcastUtils);
+
+ // Initialize local simulcast.
+
+ // TODO(gp) move into SimulcastManager.prototype.getUserMedia and take into
+ // account constraints.
+ if (!config.enableSimulcast) {
+ this.simulcastSender = new NoSimulcastSender();
+ } else {
+
+ var isChromium = window.chrome,
+ vendorName = window.navigator.vendor;
+ if(isChromium !== null && isChromium !== undefined && vendorName === "Google Inc.") {
+ var ver = parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10);
+ if (ver > 37) {
+ this.simulcastSender = new NativeSimulcastSender();
+ } else {
+ this.simulcastSender = new NoSimulcastSender();
+ }
+ } else {
+ this.simulcastSender = new NoSimulcastSender();
+ }
+
+ }
}
/**
@@ -1010,28 +1033,6 @@ SimulcastManager.prototype.getLocalVideoStream = function() {
*/
SimulcastManager.prototype.getUserMedia = function (constraints, success, err) {
- // Initialize local simulcast.
-
- // TODO(gp) take into account constraints.
- if (!config.enableSimulcast) {
- this.simulcastSender = new NoSimulcastSender();
- } else {
-
- var isChromium = window.chrome,
- vendorName = window.navigator.vendor;
- if(isChromium !== null && isChromium !== undefined && vendorName === "Google Inc.") {
- var ver = parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10);
- if (ver > 37) {
- this.simulcastSender = new NativeSimulcastSender();
- } else {
- this.simulcastSender = new NoSimulcastSender();
- }
- } else {
- this.simulcastSender = new NoSimulcastSender();
- }
-
- }
-
this.simulcastSender.getUserMedia(constraints, success, err);
};