Fixes crash on non HTTPS sites.

pull/104/head
paweldomas 11 years ago
parent 5ccb720ecc
commit e94c4238d1
  1. 10
      app.js

@ -144,16 +144,10 @@ function connect(jid, password) {
}
/**
* HTTPS only:
* We first ask for audio and video combined stream in order to get permissions and not to ask twice.
* Then we dispose the stream and continue with separate audio, video streams(required for desktop sharing).
* We ask for audio and video combined stream in order to get permissions and
* not to ask twice.
*/
function obtainAudioAndVideoPermissions(callback) {
// This makes sense only on https sites otherwise we'll be asked for permissions every time
if (location.protocol !== 'https:') {
callback();
return;
}
// Get AV
getUserMediaWithConstraints(
['audio', 'video'],

Loading…
Cancel
Save