Modern browsers make it possible to select input and output devices including cameras, microphones and speakers. For example: On a phone, select the front or rear-facing camera. On a laptop, choose the internal speakers or a speaker connected by Bluetooth. For a video chat, choose internal or external microphone or camera. All this functionality is exposed by the MediaDevices object, which is retu