Fixes crash on non HTTPS sites.
This commit is contained in:
parent
5ccb720ecc
commit
e94c4238d1
10
app.js
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…
Reference in New Issue