navigator.mediaDevices should be accessible on *.localhost and not only localhost
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
People
(Reporter: mcgiordalp, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36
Steps to reproduce:
Both navigator.mediaDevices and navigator.getUserMedia works on either SecureContext or localhost only. The problem is that the browser doesn't detect subdomains of localhost as a localhost context, that is a different behavior to what happens in Google Chrome.
Actual results:
Go to example.localhost, open your console and type navigator.mediaDevices, it returns undefined.
Expected results:
It should have returned a MediaDevices object.
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•5 years ago
|
||
Not sure if this is the right component - sorry if not.
Comment 3•5 years ago
|
||
I guess it should be moved to one of media components but I am not so sure.
Reporter | ||
Comment 4•5 years ago
|
||
I think it was in the correct component, DOM: Device Interfaces
Updated•5 years ago
|
Comment 5•5 years ago
|
||
:jib, it looks like to be related to WebRTC, can you take a look at this?
Comment 6•5 years ago
|
||
This looks like a feature of our [SecureContext]
implementation (though we do use a custom function in this particular case).
Andrea, do you know the right component for this, or whether our current behavior is intended?
Reporter | ||
Comment 7•5 years ago
|
||
If the intended behavior is similar to what chrome does, I believe the change would be here. For some reason this function is receiving a host different than localhost
when the url is example.localhost
.
Comment 8•5 years ago
|
||
This is a dup of bug 1220810. I wrote a patch for that (thanks to :jkt, who wrote the initial version of it), but it's blocked by a DocumentChannel regression. I hope to have it fixed in the next cycle.
Description
•