Testing your Code
To test this code, it is a requirement that the user has access to a web server with a valid SSL certificate. However, due to security requirements in Chrome, it is not possible to enumerate the audio/video devices without a valid SSL certificate.
It is recommended that if the user cannot get access to a web server with valid certs, a local Docker instance is created with self-signed certificates that are loaded into their local certificate store to make them valid. These steps will not form a part of this guide but can be found from many sources with a Google search.