I would like to find out if the user\'s device has an attached camera and microphone, and if so, has permissions been granted to get the audio and video stream using Javascr
Yes it is quite possible to detect whether a microphone and a camera is available after granting the permission,
navigator.getUserMedia({ audio: true, video: true},function (stream) {
if(stream.getVideoTracks().length > 0 && stream.getAudioTracks().length > 0){
//code for when none of the devices are available
}else{
// code for when both devices are available
}
});