Obtaining audio+video stream and closing it in order to reduce permission queries makes sense only on HTTPS sites.

pull/56/head
paweldomas 11 years ago
parent 68b8512b27
commit a049bcde71
  1. 6
      app.js

@ -63,10 +63,16 @@ function init() {
}
/**
* 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).
*/
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