Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

navigator.mediaDevices is undefined #25

Open
leilyhasanzadeh opened this issue Sep 20, 2020 · 4 comments
Open

navigator.mediaDevices is undefined #25

leilyhasanzadeh opened this issue Sep 20, 2020 · 4 comments

Comments

@leilyhasanzadeh
Copy link

Hello,
I run the program in my network. But I get this problem when I try to call from a system on my network.
Uncaught TypeError: navigator.mediaDevices is undefined
I try both chrome and firefox browsers and this issue is on both of them.

@yjwSurCode
Copy link

Try to serve the web page over HTTPS. I've read that iOS Safari only allows access to the microphone (and camera) on secure connections.

I had the same problem while implementing ng-audio-recorder in my Ionic Angular app. While working flawlessly on desktop, mobile safari threw this error. Switching to HTTPS solved the problem.

@yjwSurCode
Copy link

@nguymin4 Is that the solution?

@nguymin4
Copy link
Owner

@yjwSurCode I don't even know if iOS works nicely with WebRTC nowadays or not. There used to be a lot of problems. But usually if you try to access non-HTTPS web page, your browser will warn you about insecure connection.

@ziyuang
Copy link

ziyuang commented Jun 10, 2023

It fails, not just warns:

ERROR
Cannot read properties of undefined (reading 'getUserMedia')
TypeError: Cannot read properties of undefined (reading 'getUserMedia')
    at MediaDevice.start (webpack:///./src/js/communication/MediaDevice.js?:53:30)
    at PeerConnection.start (webpack:///./src/js/communication/PeerConnection.js?:71:10)
    at App.startCall (webpack:///./src/js/App.js?:86:10)
    at eval (webpack:///./src/js/components/MainWindow.js?:55:26)
    at HTMLUnknownElement.callCallback (webpack:///../node_modules/react-dom/cjs/react-dom.development.js?:4164:14)
    at Object.invokeGuardedCallbackDev (webpack:///../node_modules/react-dom/cjs/react-dom.development.js?:4213:16)
    at invokeGuardedCallback (webpack:///../node_modules/react-dom/cjs/react-dom.development.js?:4277:31)
    at invokeGuardedCallbackAndCatchFirstError (webpack:///../node_modules/react-dom/cjs/react-dom.development.js?:4291:25)
    at executeDispatch (webpack:///../node_modules/react-dom/cjs/react-dom.development.js?:9041:3)
    at processDispatchQueueItemsInOrder (webpack:///../node_modules/react-dom/cjs/react-dom.development.js?:9073:7)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants