Update server
This commit is contained in:
parent
df0cb81a8e
commit
a21451e46d
@ -20513,47 +20513,58 @@ const streamSuccess = (stream) => {
|
||||
const getLocalStream = () => {
|
||||
console.log('[getLocalStream]');
|
||||
|
||||
try {
|
||||
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') {
|
||||
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;
|
||||
}
|
||||
|
||||
// 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;
|
||||
navigator.mediaDevices.getUserMedia({
|
||||
audio: true,
|
||||
video: {
|
||||
qvga : { width: { ideal: 320 }, height: { ideal: 240 } },
|
||||
vga : { width: { ideal: 640 }, height: { ideal: 480 } },
|
||||
hd : { width: { ideal: 1280 }, height: { ideal: 720 } }
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
console.log('eeeeee', error);
|
||||
}
|
||||
})
|
||||
.then((streamSuccess) => {
|
||||
|
||||
return streamSuccess
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error.message)
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
navigator.mediaDevices.getUserMedia({
|
||||
audio: true,
|
||||
video: {
|
||||
qvga : { width: { ideal: 320 }, height: { ideal: 240 } },
|
||||
vga : { width: { ideal: 640 }, height: { ideal: 480 } },
|
||||
hd : { width: { ideal: 1280 }, height: { ideal: 720 } }
|
||||
}
|
||||
})
|
||||
.then((streamSuccess) => {
|
||||
// navigator.mediaDevices.getUserMedia({
|
||||
// audio: true,
|
||||
// video: {
|
||||
// qvga : { width: { ideal: 320 }, height: { ideal: 240 } },
|
||||
// vga : { width: { ideal: 640 }, height: { ideal: 480 } },
|
||||
// hd : { width: { ideal: 1280 }, height: { ideal: 720 } }
|
||||
// }
|
||||
// })
|
||||
// .then((streamSuccess) => {
|
||||
|
||||
return streamSuccess
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error.message)
|
||||
})
|
||||
// return streamSuccess
|
||||
// })
|
||||
// .catch(error => {
|
||||
// console.log(error.message)
|
||||
// })
|
||||
}
|
||||
|
||||
const goConnect = () => {
|
||||
|
@ -155,47 +155,58 @@ const streamSuccess = (stream) => {
|
||||
const getLocalStream = () => {
|
||||
console.log('[getLocalStream]');
|
||||
|
||||
try {
|
||||
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') {
|
||||
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;
|
||||
}
|
||||
|
||||
// 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;
|
||||
navigator.mediaDevices.getUserMedia({
|
||||
audio: true,
|
||||
video: {
|
||||
qvga : { width: { ideal: 320 }, height: { ideal: 240 } },
|
||||
vga : { width: { ideal: 640 }, height: { ideal: 480 } },
|
||||
hd : { width: { ideal: 1280 }, height: { ideal: 720 } }
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
console.log('eeeeee', error);
|
||||
}
|
||||
})
|
||||
.then((streamSuccess) => {
|
||||
|
||||
return streamSuccess
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error.message)
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
navigator.mediaDevices.getUserMedia({
|
||||
audio: true,
|
||||
video: {
|
||||
qvga : { width: { ideal: 320 }, height: { ideal: 240 } },
|
||||
vga : { width: { ideal: 640 }, height: { ideal: 480 } },
|
||||
hd : { width: { ideal: 1280 }, height: { ideal: 720 } }
|
||||
}
|
||||
})
|
||||
.then((streamSuccess) => {
|
||||
// navigator.mediaDevices.getUserMedia({
|
||||
// audio: true,
|
||||
// video: {
|
||||
// qvga : { width: { ideal: 320 }, height: { ideal: 240 } },
|
||||
// vga : { width: { ideal: 640 }, height: { ideal: 480 } },
|
||||
// hd : { width: { ideal: 1280 }, height: { ideal: 720 } }
|
||||
// }
|
||||
// })
|
||||
// .then((streamSuccess) => {
|
||||
|
||||
return streamSuccess
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error.message)
|
||||
})
|
||||
// return streamSuccess
|
||||
// })
|
||||
// .catch(error => {
|
||||
// console.log(error.message)
|
||||
// })
|
||||
}
|
||||
|
||||
const goConnect = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user