|
@@ -63,10 +63,16 @@ function init() {
|
63
|
63
|
}
|
64
|
64
|
|
65
|
65
|
/**
|
|
66
|
+ * HTTPS only:
|
66
|
67
|
* We first ask for audio and video combined stream in order to get permissions and not to ask twice.
|
67
|
68
|
* Then we dispose the stream and continue with separate audio, video streams(required for desktop sharing).
|
68
|
69
|
*/
|
69
|
70
|
function obtainAudioAndVideoPermissions(callback){
|
|
71
|
+ // This makes sense only on https sites otherwise we'll be asked for permissions every time
|
|
72
|
+ if(location.protocol !== 'https:') {
|
|
73
|
+ callback();
|
|
74
|
+ return;
|
|
75
|
+ }
|
70
|
76
|
// Get AV
|
71
|
77
|
getUserMediaWithConstraints(
|
72
|
78
|
['audio', 'video'],
|