Update server
This commit is contained in:
parent
7a2d02dcda
commit
9111c4e245
@ -20520,32 +20520,32 @@ const getLocalStream = () => {
|
|||||||
hd : { width: { ideal: 1280 }, height: { ideal: 720 } }
|
hd : { width: { ideal: 1280 }, height: { ideal: 720 } }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(streamSuccess)
|
.then((streamSuccess) => {
|
||||||
|
navigator.permissions.query(
|
||||||
|
{ name: 'microphone' }
|
||||||
|
).then(function(permissionStatus) {
|
||||||
|
|
||||||
|
console.log('🟨 [PERMISSION] onchange', permissionStatus.state); // granted, denied, prompt
|
||||||
|
|
||||||
|
// If he has entered before, the saved access is already saved
|
||||||
|
if (permissionStatus === 'grated') {
|
||||||
|
doIHaveAudio = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If it is the first time client enter and give permission
|
||||||
|
permissionStatus.onchange = function() {
|
||||||
|
console.log('🟨 [PERMISSION] onchange', this.state);
|
||||||
|
if (this.state === 'granted') {
|
||||||
|
doIHaveAudio = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
return streamSuccess
|
||||||
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.log(error.message)
|
console.log(error.message)
|
||||||
})
|
})
|
||||||
|
|
||||||
navigator.permissions.query(
|
|
||||||
{ name: 'microphone' }
|
|
||||||
).then(function(permissionStatus) {
|
|
||||||
|
|
||||||
console.log('🟨 [PERMISSION] onchange', permissionStatus.state); // granted, denied, prompt
|
|
||||||
|
|
||||||
// If he has entered before, the saved access is already saved
|
|
||||||
if (permissionStatus === 'grated') {
|
|
||||||
doIHaveAudio = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If it is the first time client enter and give permission
|
|
||||||
permissionStatus.onchange = function() {
|
|
||||||
console.log('🟨 [PERMISSION] onchange', this.state);
|
|
||||||
if (this.state === 'granted') {
|
|
||||||
doIHaveAudio = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const goConnect = () => {
|
const goConnect = () => {
|
||||||
|
@ -162,32 +162,32 @@ const getLocalStream = () => {
|
|||||||
hd : { width: { ideal: 1280 }, height: { ideal: 720 } }
|
hd : { width: { ideal: 1280 }, height: { ideal: 720 } }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(streamSuccess)
|
.then((streamSuccess) => {
|
||||||
|
navigator.permissions.query(
|
||||||
|
{ name: 'microphone' }
|
||||||
|
).then(function(permissionStatus) {
|
||||||
|
|
||||||
|
console.log('🟨 [PERMISSION] onchange', permissionStatus.state); // granted, denied, prompt
|
||||||
|
|
||||||
|
// If he has entered before, the saved access is already saved
|
||||||
|
if (permissionStatus === 'grated') {
|
||||||
|
doIHaveAudio = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If it is the first time client enter and give permission
|
||||||
|
permissionStatus.onchange = function() {
|
||||||
|
console.log('🟨 [PERMISSION] onchange', this.state);
|
||||||
|
if (this.state === 'granted') {
|
||||||
|
doIHaveAudio = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
return streamSuccess
|
||||||
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.log(error.message)
|
console.log(error.message)
|
||||||
})
|
})
|
||||||
|
|
||||||
navigator.permissions.query(
|
|
||||||
{ name: 'microphone' }
|
|
||||||
).then(function(permissionStatus) {
|
|
||||||
|
|
||||||
console.log('🟨 [PERMISSION] onchange', permissionStatus.state); // granted, denied, prompt
|
|
||||||
|
|
||||||
// If he has entered before, the saved access is already saved
|
|
||||||
if (permissionStatus === 'grated') {
|
|
||||||
doIHaveAudio = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If it is the first time client enter and give permission
|
|
||||||
permissionStatus.onchange = function() {
|
|
||||||
console.log('🟨 [PERMISSION] onchange', this.state);
|
|
||||||
if (this.state === 'granted') {
|
|
||||||
doIHaveAudio = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const goConnect = () => {
|
const goConnect = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user