Issue rendring youtube video using st.video() in Docker container

Hello Streamlit community

st.video()

I am using st.video() to render a youtube link.
I have no problem running in my local machine

What is not working?

I am facing issue when I dockerize the app and run the container, then I am getting (not faced with all the links but there are some)

Are there any dependencies that I am missing for the container?

Debug info

I am using
python - 3.10
streamlit - 1.22.0
local machine OS - Ubuntu 22.04

Hi @msam

Could you check if your docker container can access the internet (try requests to access webpages), perhaps there’s a proxy issue?

Hope this helps!

Best regards,
Chanin

I think have found the solution. This β€œissue” has nothing to do with the st.video or Docker but Youtube rendering. Found a stackoverflow answer

YouTube forbids embedding some videos in a localhost environment without a public domain, but your video can be embedded with no issue through a public domain/ sub-domain try the same using webhosting apps or online html tools

When I host my webapp in AWS this does not happen and works like a charm
Thanks

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.