Forums

Unable to access Webcam

I have an application that is expected to open the webcam of the device when it hits a certain url for example: http://127.0.0.1:8000/camera. This works in my local machine. But when uploaded to the server, its not working. Looked into the access logs and it is hitting the url. But the webcam is not opening up. Any idea why? Is there a setting I have missed?

There is no webcam on the PythonAnywhere servers and 127.0.0.1 is a special address that means "the machine the request is made from". If you're trying to access a webcam that is on your own machine, it must be visible to the internet and probably isn't.