whitphx/streamlit-webrtc

Webcam Feed Not Showing Up

Prana-S opened this issue · 2 comments

I have got Streamlit webrtc running on localhost, but when I put it on to Streamlit Cloud I see this:
image
Here is my code:

import streamlit as st
from streamlit_webrtc import VideoTransformerBase, webrtc_streamer, VideoHTMLAttributes

def main():
st.title("Video Feed")
webrtc_streamer(key="example", video_html_attrs=VideoHTMLAttributes(autoPlay=True, controls=False, style={"width": "100%"}, muted=True))

if name == "main":
main()

Here are the logs:
image

@whitphx Has this Error ever happened to you?

The same error occurred on the official demo hosted on the Community Cloud (https://webrtc.streamlit.app/) as reported at #1213, and I resolved it as #1213 (comment).

In short, the network infra of the Community Cloud has changed and setting up TURN servers is now required.
I updated the relevant section in README.md as https://github.com/whitphx/streamlit-webrtc#configure-the-turn-server-if-necessary, so please refer to it.

Thanks!