Update server
This commit is contained in:
parent
67042185c4
commit
3bc15fdef1
@ -20372,7 +20372,8 @@ console.log('[URL] ASSET_ID', ASSET_ID, '| ACCOUNT_ID', ACCOUNT_ID, '| callId',
|
|||||||
|
|
||||||
console.log('🟩 config', config)
|
console.log('🟩 config', config)
|
||||||
|
|
||||||
let socket, hub
|
let socket, hub, having
|
||||||
|
let doIHaveAudio = false
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
hub = io(config.hubAddress)
|
hub = io(config.hubAddress)
|
||||||
@ -20549,20 +20550,22 @@ const getLocalStream = () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
navigator.permissions.query(
|
navigator.permissions.query(
|
||||||
// { name: 'camera' }
|
|
||||||
{ name: 'microphone' }
|
{ name: 'microphone' }
|
||||||
// { name: 'geolocation' }
|
).then(function(permissionStatus) {
|
||||||
// { name: 'notifications' }
|
|
||||||
// { name: 'midi', sysex: false }
|
|
||||||
// { name: 'midi', sysex: true }
|
|
||||||
// { name: 'push', userVisibleOnly: true }
|
|
||||||
// { name: 'push' } // without userVisibleOnly isn't supported in chrome M45, yet
|
|
||||||
).then(function(permissionStatus){
|
|
||||||
|
|
||||||
console.log(permissionStatus.state); // granted, denied, prompt
|
console.log('🟨 [PERMISSION] onchange', permissionStatus.state); // granted, denied, prompt
|
||||||
|
|
||||||
permissionStatus.onchange = function(){
|
// If he has entered before, the saved access is already saved
|
||||||
console.log("Permission changed to " + this.state);
|
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 === 'grated') {
|
||||||
|
doIHaveAudio = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
@ -14,7 +14,8 @@ console.log('[URL] ASSET_ID', ASSET_ID, '| ACCOUNT_ID', ACCOUNT_ID, '| callId',
|
|||||||
|
|
||||||
console.log('🟩 config', config)
|
console.log('🟩 config', config)
|
||||||
|
|
||||||
let socket, hub
|
let socket, hub, having
|
||||||
|
let doIHaveAudio = false
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
hub = io(config.hubAddress)
|
hub = io(config.hubAddress)
|
||||||
@ -191,20 +192,22 @@ const getLocalStream = () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
navigator.permissions.query(
|
navigator.permissions.query(
|
||||||
// { name: 'camera' }
|
|
||||||
{ name: 'microphone' }
|
{ name: 'microphone' }
|
||||||
// { name: 'geolocation' }
|
).then(function(permissionStatus) {
|
||||||
// { name: 'notifications' }
|
|
||||||
// { name: 'midi', sysex: false }
|
|
||||||
// { name: 'midi', sysex: true }
|
|
||||||
// { name: 'push', userVisibleOnly: true }
|
|
||||||
// { name: 'push' } // without userVisibleOnly isn't supported in chrome M45, yet
|
|
||||||
).then(function(permissionStatus){
|
|
||||||
|
|
||||||
console.log(permissionStatus.state); // granted, denied, prompt
|
console.log('🟨 [PERMISSION] onchange', permissionStatus.state); // granted, denied, prompt
|
||||||
|
|
||||||
permissionStatus.onchange = function(){
|
// If he has entered before, the saved access is already saved
|
||||||
console.log("Permission changed to " + this.state);
|
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 === 'grated') {
|
||||||
|
doIHaveAudio = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user