apache / openmeetings

Mirror of Apache Openmeetings

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Proposition to change handler for web camera HTTP access errors.

sashabrava opened this issue · comments

There seem to be a small issue with the page of webcamera check http://ip_address:5080/openmeetings/hash?app=settings.
As far as I've tested, Chrome 75 shows error enumerateDevices() not supported. because navigator.mediaDevices object is null.
Firefox 68 shows error NotAllowedError: The request is not allowed by the user agent or the platform in the current context and navigator.mediaDevices is not null.

However, the page works fine in both browsers on 5443 port.

The reason seem to be described on https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Security - if the context isn't secure, web camera access wouldn't work well.
Maybe it worth checking the value of window.isSecureContext and offering user to switch on HTTPS?

Port 5080 should be used for front-end proxy only
I can't offer user to switch to secure port due to I have no idea which port was configured as secure :(
I can show error stating "Camera/microphone will not work in insecure environment"
Would it be sufficient?

Yes, such error description is clear.

Should be fixed, please check latest SNAPSHOT build :)