Twitch embedding

Hi everyone,

I am currently trying to use streamlit-player to embed twitch videos and lives on my app. Using this package allowed me to do so, but only on my local version. Everything is working fine on local, but I get a message error from Twitch once I deploy the app (“ doesn’t allow the connection”)
I get from the documentation that I need a SSL connection. When I add “&”, I get a black screen in the player, but no error.

Is there a way to embed Twitch in streamlit?

Thanks !

ps: here’s the code that works on local :

link = st.text_input(label= "Link of the video")
play = st.button("play the video")
if play:

get Twitch API key


Thanks for your answer. I read the documentations in order to use Twitch API but it seems quite hard to implement in streamlit as I cannot use in st.markdown.

If you have more information on how to use this API in streamlit I would gladly read it, as I am now really stuck !

Well as a “solution” : I deployed on heroku.

I couldn’t manage to make the “&parent” parameter work on streamlit cloud (where the domain is .io), but it worked nicely on heroku where I just added “&” to the url (as explained on the twitch documentation) in a st.markdown.

Hope it might help someone !