Fixes error when simulcast is disabled.
This commit is contained in:
parent
774785c648
commit
65ddc22112
|
@ -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>
|
||||
|
|
45
simulcast.js
45
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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue