Mac: allow the browser app
Open Apple menu > System Settings > Privacy & Security. Check Microphone and Camera. Turn on access for the browser you are using, such as Safari, Chrome, Edge, or Firefox.
If the browser was open while you changed the setting, quit it fully and open it again. macOS permission changes can require a browser restart before the page can use the device.