Yuuta Moriyama
Yuuta Moriyama

Reputation: 459

Event listener that "camera and microphone blocked" is allowed

By getUserMedia, it is possible that UserMedia is blocked by user.

 navigator.mediaDevices.getUserMedia({ audio: true })
      .then((stream) => {
        ...
      })
      .catch(() => {
        this.usermedia_blocked = true;
      });

When the setting is changed to "always allow", I want to continue the subsequent task. But how can I detect that "always allow & done" is clicked?

enter image description here

Appear.in start video call after "always allow & done " is clicked. I want to do the same thing.

Upvotes: 0

Views: 1244

Answers (1)

Philipp Hancke
Philipp Hancke

Reputation: 17275

appear.in developer here. What do is to poll navigator.mediaDevices.enumerateDevices(), check if we have device labels on the camera and microphone (which implies permission has been re-granted) and then call getUserMedia again.

Upvotes: 1

Related Questions