Update server

This commit is contained in:
Sergiu Toma 2022-11-29 03:50:45 +02:00
parent 7a2d02dcda
commit 9111c4e245
2 changed files with 46 additions and 46 deletions

View File

@ -20520,32 +20520,32 @@ const getLocalStream = () => {
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 => {
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 = () => {

View File

@ -162,32 +162,32 @@ const getLocalStream = () => {
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 => {
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 = () => {