TypeError: navigator.mediaDevices is undefined this error getting while using PushToTalk Sample .This line getting error mentioned above :navigator.mediaDevices.getUserMedia({ audio: true, video: false }).then(gotStreams).catch(onError);

Hello Divyakumar,

It will be very nice if you give us more details how you are accessing the sample. What I can guess is that you are not accessing it via a secure connection. This is required to get the user media devices. More information you can find here:

https://blog.mozilla.org/webrtc/camera-microphone-require-https-in-firefox-68/

https://webidl.spec.whatwg.org/#SecureContext

https://groups.google.com/a/chromium.org/g/blink-dev/c/SGWYHfR5CyY/m/uyUBJZAqBwAJ

I hope that helps.

Best regards

Teodor

Thanks for your response. let me provide some more details.

as of now when we implemented functionality on push to talk with sample program on windows 10 OS with self certified SSL , it is working fine. we are able to send voice message on IP SPEAKER which is associated with camera.

when we moved to windows 2016 server OS with same web application hosted with self certified SSL, we are facing error as mentioned earlier.

I thought we need server machine connected with MIC then only it will work. Is it Correct ? do we need MIC as hardware or we can use IP SPEAKER MIC ?

Hope this will provide you more insight to support us.

Thank you Divyakumar. This give me more details about the environment . Unfortunately does not explain the problem you are facing. You don’t need a physical MIC in order to access the media devices.

What happens if you open the sample from localhost ?

thanks for your response. we have worked further with samples. We have Windows Server 2016 OS. when we run Application to test Push To Talk feature we face exception “DOM Exception”. We have AXIX Speaker and Mic assigned to Camera. Earlier error as reported earlier is not there. We have enabled SSL security on the Mobile stream and Also installed self certified SSL on application in IIS.

As of now we are able to get the VideoStream with SSL enabled. However still TALK button is not working and “DOM Exception” error is occurring.

When we run same application with self certified SSL on Windows 10 Pro OS it works fine.

Can you give more details about the DOM exception. There should be more detail what is causing it : https://developer.mozilla.org/en-US/docs/Web/API/DOMException

getting error message

error = DOMException: Requested device not found

Hello Divyakumar and Happy New Year.

This error means that there are no web cam or microphone on the Windows Server 2016. Is that correct? If yes you need to have microphone in order to use the push to talk functionality.

Best regards

Teodor

Thanks for your response.

we will work on it and revert if any further support needed.

Best Regards

Divyakumar Shah