I am facing the same issue. The webcam isn’t being viewed, when hosted on streamlit. sharing.
I have attached the link to my application: https://share.streamlit.io/rahularepaka/objectdetectionweb/main/main.py 9
Here is the log :
021-08-07 08:04:07.633 Connection(0) ICE failed
2021-08-07 08:04:07.642 ICE connection state is failed
2021-08-07 08:04:07.642 ICE connection state is closed

Thanks!