jitsi / jitsi-meet

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
https://jitsi.org/meet
Apache License 2.0
22.79k stars 6.67k forks source link

Cannot call getUserMedia of undefined #7009

Closed jhiswin closed 4 years ago

jhiswin commented 4 years ago

Description:

This error now pops up when trying to use Jitsi Meet and voice:

image

Logger.js:154 2020-06-10T18:51:30.139Z [features/base/tracks] Failed to create local tracks Array(1) TypeError: Cannot read property 'getUserMedia' of undefined at RTCUtils.js:994 at new Promise () at z._newGetUserMediaWithConstraints (RTCUtils.js:993) at z. (RTCUtils.js:1367)

Steps to reproduce:

Open an iframe using JitsiMeetExternalAPI or iframe src directly. Try to use microphone. Microphone does not work.

Expected behavior:

Microphone should work. RTCUtils:994 should check for navigator.getUserMedia as a fallback if navigator.mediaDevices.getUserMedia doesn't exist.

Actual behavior:

image

Logger.js:154 2020-06-10T18:51:30.139Z [features/base/tracks] Failed to create local tracks Array(1) TypeError: Cannot read property 'getUserMedia' of undefined at RTCUtils.js:994 at new Promise () at z._newGetUserMediaWithConstraints (RTCUtils.js:993) at z. (RTCUtils.js:1367)

Server information:

Client information:

Chrome Version 83.0.4103.97 (Official Build) (64-bit) Windows 10 latest updates

jhiswin commented 4 years ago

Video is now also broken

jhiswin commented 4 years ago

https://test.webrtc.org/ passes

jhiswin commented 4 years ago

I'm really not sure what is going on right now. Did you guys maybe fix it on the fly today? It somehow started semi-working all on its own again. After it started working partially, I had to restart Chrome, clear all permissions. Then somehow my local test computer stopped requesting microphone permissions altogether, and was persisting denial of mic permissions, and I had to enable it manually. It's really bizarre.

saghul commented 4 years ago

We haven’t deployed any fixes today.

saghul commented 4 years ago

Tentatively closing since it "solved itself". Holler if it reappears and we'll reopen.

jhiswin commented 4 years ago

Just wanted to update you guys on what (appears to have) happened.

So we have other programs that also use the microphone first, and this allows silent blocking. Chrome does a strange thing where if another requesting page or iframe is not visible when requesting access, it willl just block access to the microphone, and then persist the blocking. It somehow happens that sometimes the iframe isn't visible or is 0 dimensions when it requests access, and then just gets blocked silently, and it requires manually enabling camera/microphone and completely restarting the browser to get it working again. I've even had to clear cache in testing a few times. I don't know yet if this is a bug in Chrome, or a security feature, a combination of the two, or something else like a conflict with the other microphone capture web app.

My temporary hack is to use a tiny iframe that is still visible, and then overwrite that iframe with the Jitsi iframe rendering, which seems to prevent the problem. Unfortunately I still have to ask all users who already opened it once to manually enable microphone access, because the blocking ends up persisting.

I'm currently looking at either hooking permissions events and double checking them and adding a banner to ask them to enable the microphone manually, and/or using a separate dedicated window for Jitsi instead of trying to embed it.

Vacika commented 3 years ago

Having the same problem here, i get this error only when accessing via iPhone chrome browser.

YesThatGy commented 3 years ago

I'm also having this problem. Not that it matters; this issue appears to be closed.

LEAVING COMMENT FOR POSTERITY: You have to be using HTTPS in the window containing the Jit.si iframe! The permissions issue I was having was because I was doing dev/localhost via http. Installed a LetsEncrypt cert and all is well now.