vasanthv / talk

Group video call for the web. No signups. No downloads.

Home Page:https://vasanthv.github.io/talk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow access without webcam

tschuehly opened this issue · comments

I really would like to use this project, but the need for a webcam for every user is not optimal, some of my mates don't have a webcam so it would be great if you could use the website without a camera.

@tschuehly you can use something like this - to have error fallback function if it fails on Camera to try with video set to false

navigator.mediaDevices
    .getUserMedia({ audio: USE_AUDIO, video: USE_VIDEO })
    .then((stream) => {
      return onSuccessGetMedia(stream, callback);
    })
    .catch(() => {
      navigator.mediaDevices
        .getUserMedia({ audio: USE_AUDIO, video: false })
        .then((stream) => {
          return onSuccessGetMedia(stream, callback);
        })
        .catch((err) => {
          alert('This app will not work without camera/microphone access.');
          if (errorback) errorback();
        });

      /* user denied access to a/v */
    });

This did not work,, perhaps it would be better to request permissions after clicking on the video/microphone buttons...

commented

how to display name on video?
Example
temp