Update server

This commit is contained in:
Sergiu Toma 2022-11-29 02:09:37 +02:00
parent 67042185c4
commit 3bc15fdef1
2 changed files with 30 additions and 24 deletions

View File

@ -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 } console.log('🟨 [PERMISSION] onchange', permissionStatus.state); // granted, denied, prompt
// { 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 // If he has entered before, the saved access is already saved
if (permissionStatus === 'grated') {
doIHaveAudio = true;
}
permissionStatus.onchange = function(){ // If it is the first time client enter and give permission
console.log("Permission changed to " + this.state); permissionStatus.onchange = function() {
console.log('🟨 [PERMISSION] onchange', this.state);
if (this.state === 'grated') {
doIHaveAudio = true;
}
} }
}) })

View File

@ -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 } console.log('🟨 [PERMISSION] onchange', permissionStatus.state); // granted, denied, prompt
// { 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 // If he has entered before, the saved access is already saved
if (permissionStatus === 'grated') {
doIHaveAudio = true;
}
permissionStatus.onchange = function(){ // If it is the first time client enter and give permission
console.log("Permission changed to " + this.state); permissionStatus.onchange = function() {
console.log('🟨 [PERMISSION] onchange', this.state);
if (this.state === 'grated') {
doIHaveAudio = true;
}
} }
}) })