mozmorris / react-webcam

Webcam component
https://codepen.io/mozmorris/pen/JLZdoP
MIT License
1.65k stars 281 forks source link

Is there a way to use this without a camera? (Load a stream with only audio track?) #311

Closed Nitzahon closed 2 years ago

Nitzahon commented 2 years ago

I can successfully load the webcam and remove or add video/audio tracks as needed. but I still need a video stream to get the webcam to load. I want to know is there a way, if the user does not have any video input devices but only audio, can we get a stream started with that?

mozmorris commented 2 years ago

@Nitzahon my advice would be to implement this yourself using the getUserMedia api. The underlying code of react-webcam is simple - you could extract the functionality you need and simplify the code for your needs.