Attempt to work with just audio sites
Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
parent
be5c23d9fc
commit
3bbff22ec2
@ -397,7 +397,14 @@ const MediaAgent = ({setPeers}) => {
|
|||||||
navigator.mozGetUserMedia ||
|
navigator.mozGetUserMedia ||
|
||||||
navigator.msGetUserMedia);
|
navigator.msGetUserMedia);
|
||||||
|
|
||||||
return navigator.mediaDevices.getUserMedia({audio: true, video: true})
|
return navigator.mediaDevices
|
||||||
|
.getUserMedia({audio: true, video: true})
|
||||||
|
.catch((error) => {
|
||||||
|
console.log(`media-agent - Access granted to audio and video ` +
|
||||||
|
`failed. Trying just audio.`);
|
||||||
|
return navigator.mediaDevices
|
||||||
|
.getUserMedia({ audio: true, video: false })
|
||||||
|
})
|
||||||
.then((media) => { /* user accepted access to a/v */
|
.then((media) => { /* user accepted access to a/v */
|
||||||
console.log("media-agent - Access granted to audio/video");
|
console.log("media-agent - Access granted to audio/video");
|
||||||
media.getVideoTracks().forEach((track) => {
|
media.getVideoTracks().forEach((track) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user